appveyor: derive the build version from the repo #819
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!819
Loading…
Reference in a new issue
No description provided.
Delete branch "appveyor-version-from-repo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The AppVeyor "Build version format" is currently hard-coded in the project's web settings. This moves version control into the repo:
version: '{build}'to.appveyor.yml(aversion:in the file overrides the UI setting), andbefore_buildstep, replaces it with a version derived from the repo — theVERSIONfile + the short commit hash + the build number:Update-AppveyorBuildruns after checkout (so theVERSIONfile is available);APPVEYOR_REPO_COMMITprovides the commit andAPPVEYOR_BUILD_NUMBERkeeps each build's version unique even if the same commit is built more than once.Assisted-by: claude-code:claude-opus-4-8
@ -6,6 +12,15 @@ environment:arch: Win32the hard-coded
7might bite us in general case. Is there a way to ask git to give the short version?@ -6,6 +12,15 @@ environment:arch: Win32Done in
bd64102— switched togit rev-parse --short HEAD, so git picks the (unambiguous) short length itself instead of a hard-coded 7. Verified on AppVeyor: the build set the version to0.16.0-bd64102.2082.Drafted with Claude Code.