-
Notifications
You must be signed in to change notification settings - Fork 7
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
Include build-version in artifact names #62
Conversation
@yarikoptic Is it necessary for the Linux build steps to clone git-annex into a directory in |
@yarikoptic @joeyh What is the recommended way to get just the git-annex version when building? With Windows, I captured the output from |
@@ -86,6 +88,11 @@ jobs: | |||
./Build/BuildVersion > dist/build-version | |||
working-directory: git-annex | |||
|
|||
- name: Capture build-version | |||
id: build-version | |||
run: echo "::set-output name=version::$(cat dist/build-version)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry to be a pain, but IIRC that dist/build-version which annex produces is "subopimal":
$> Build/BuildVersion
8.20201008-ga3bb6f235%
so it is not sortable at all. That is why we should not use it for "our" (this one is what what @joeyh wants/uses, so we just include that produced artifact) version, which should be based on the output of git describe
:
$> git describe
8.20201007-145-ga3bb6f235
but with a slight tune up (my personal convention I guess)
$> git describe | sed -e 's,-,+git,'
8.20201007+git145-ga3bb6f235
which makes it a bit more obvious what is that version about (git
still understands it since looks only for -g
suffix with hexsha).
And then artifact name should include architecture. E.g. in http://datasets.datalad.org/datalad/packages/windows/ I added _x64
since felt that is what windows folks got used to, although in case of a debian package should be _amd64
(it is no longer "amd" but that is what debian uses, heh).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is using the output of uname -p
as the architecture acceptable, or should it be specifically _x64
for Windows, _amd64
for Linux, and ... what? ... for macOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, for "debian" (current only Linux) if to be specific, should be output of
$> dpkg --print-architecture
amd64
ran within that singularity env. And if I download that .zip with artifacts, I see that we do have version already nicely set for that .deb:
$> unzip git-annex-debianstandalone-packages.zip
Archive: git-annex-debianstandalone-packages.zip
inflating: git-annex-build.log
inflating: git-annex-standalone_8.20201007+git145-ga3bb6f235-1~ndall+1_amd64.deb
...
no tune up needed for it at all, and may be you could just take that version altogether from the name of the .deb file?
For Windows and Mac -- I have no personal preference really. uname -p
under git shell on windows tells me "unknown" though.
I do not think it is necessary, unless it all fails and may be |
eh, I said that I do not care about OSX, but saw |
@jwodder , please
|
Version suffixes adjusted. |
Results look great to me! May be with time we would somehow minimize duplication through workflows, but meanwhile -- thank you very much @jwodder . If you are yourself satisfied, please take it from the Draft mode and let's have it merged. Then let's fixup for OSX to get tests passing -- DataLad release(s) are coming up so we would be right in time! ;) |
Closes #61.