10000 adjust custom naming, clickable commit hash in brackets by tooomm · Pull Request #2981 · Cockatrice/Cockatrice · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

adjust custom naming, clickable commit hash in brackets #2981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 10, 2018

Conversation

tooomm
Copy link
Contributor
@tooomm tooomm commented Dec 29, 2017

Short roundup of the initial problem

Version got extended with -custom_GIT-COMMIT-HASH for non-tagged builds to have a reference where there are build from or what they are based on:

-- Commit is not a release or prerelease (no git tag found)
-- Project version: 2.4.1-custom_3af2be4
-- Friendly project version: 2.4.1-custom_3af2be4 (2017-12-19)
-- Project version filename: Cockatrice-2.4.1-custom_3af2be4

So people would copy that info when they open a issue to help us with troubleshooting.

Before we used only GIT-COMMIT-HASH as version, which had the nice feature that when copied to GitHub it was clickable and linked to the commit itself.
It was then very easy to check and see a date and what the most recent change was about. Because only by looking at the commit hash nobody can tell which version the user was running in detail.

This wasn't possible any more after changing to a version number and appending the hash with a leading underscore like we do it now.

What will change with this Pull Request?

Wrap the name in brackets and make it clickable.

-- Commit is not a release or prerelease (no git tag found)
-- Project version: 2.4.1-custom(77ae2d4)
-- Friendly project version: 2.4.1-custom(77ae2d4) (2017-12-29)
-- Project version filename: Cockatrice-2.4.1-custom(77ae2d4)

This will make GitHub detect it and hotlink it again!

Examples from About window:

  • before: "Version 77ae2d4" (not even sure if there was a date at the beginning...)
  • now: "Version 2.4.1-custom_77ae2d4 (2017-12-29)"
  • with this PR: "Version 2.4.1-custom(77ae2d4) (2017-12-29)"

Other options don't get recognized by GitHub as well:

  • "Version 2.4.1-custom77ae2d4 (2017-12-29)"
  • "Version 2.4.1-custom.77ae2d4 (2017-12-29)"
  • "Version 2.4.1-custom-77ae2d4 (2017-12-29)"

The name will update in all places where it shows up. Debug log and about window, NSIS installer, file name for build artifacts etc.


I preferred [ ] brackets and tried them first.
Cmake shows it correctly, but it makes the artifact upload fail on appveyor with this message:

Push-AppveyorArtifactInternal : Cannot bind argument to parameter 'FullPath' because it is null.
At C:\Program Files\AppVeyor\BuildAgent\Modules\build-worker-api\build-worker-api.psm1:209 char:42
+     Push-AppveyorArtifactInternal -FullPath $fullPath -FileName $File ...
+                                             ~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Push-AppveyorArtifactInternal], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Appveyor.BuildAgent.Api.Utils.PushAppveyorArtifactInternalCmdlet
 
Uploading artifact CMakeCache.txt (18,995 bytes)...100%
Uploading artifact latest-x86_64 (201 bytes)...100%

(https://ci.appveyor.com/project/Daenyth/cockatrice/build/2.4.1-branch-tooomm-custom_naming-build-804/job/copc9f5e2ixsqysj#L3353)
I think they look cleaner and separate better from the date which is in round brackets already:
"Version 2.4.1-custom[ac5fbe5] (2017-12-29)"

If somebody has a solution here, let me know!

@tooomm tooomm changed the title adjust custom naming, commit hash in brackets adjust custom naming, clickable commit hash in brackets Dec 29, 2017
Copy link
Member
@ZeldaZach ZeldaZach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice change

@ZeldaZach ZeldaZach merged commit c8122c9 into master Jan 10, 2018
@tooomm tooomm deleted the tooomm-custom_naming branch January 10, 2018 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0