appveyor: derive the build version from the repo #819

Merged
Youw merged 1 commit from appveyor-version-from-repo into master 2026-06-14 06:31:44 -05:00
Youw commented 2026-06-14 06:06:29 -05:00 (Migrated from github.com)

Summary

The AppVeyor "Build version format" is currently hard-coded in the project's web settings. This moves version control into the repo:

  • adds version: '{build}' to .appveyor.yml (a version: in the file overrides the UI setting), and
  • in a before_build step, replaces it with a version derived from the repo — the VERSION file + the short commit hash + the build number:
0.16.0-1a2b3c4.42

Update-AppveyorBuild runs after checkout (so the VERSION file is available); APPVEYOR_REPO_COMMIT provides the commit and APPVEYOR_BUILD_NUMBER keeps each build's version unique even if the same commit is built more than once.

Assisted-by: claude-code:claude-opus-4-8

## Summary The AppVeyor **"Build version format"** is currently hard-coded in the project's web settings. This moves version control into the repo: - adds `version: '{build}'` to `.appveyor.yml` (a `version:` in the file overrides the UI setting), and - in a `before_build` step, replaces it with a version derived from the repo — the `VERSION` file + the short commit hash + the build number: ``` 0.16.0-1a2b3c4.42 ``` `Update-AppveyorBuild` runs after checkout (so the `VERSION` file is available); `APPVEYOR_REPO_COMMIT` provides the commit and `APPVEYOR_BUILD_NUMBER` keeps each build's version unique even if the same commit is built more than once. Assisted-by: claude-code:claude-opus-4-8
Youw (Migrated from github.com) reviewed 2026-06-14 06:18:33 -05:00
@ -6,6 +12,15 @@ environment:
arch: Win32
Youw (Migrated from github.com) commented 2026-06-14 06:18:33 -05:00

the hard-coded 7 might bite us in general case. Is there a way to ask git to give the short version?

the hard-coded `7` might bite us in general case. Is there a way to ask git to give the short version?
Youw (Migrated from github.com) reviewed 2026-06-14 06:39:52 -05:00
@ -6,6 +12,15 @@ environment:
arch: Win32
Youw (Migrated from github.com) commented 2026-06-14 06:39:52 -05:00

Done in bd64102 — switched to git 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 to 0.16.0-bd64102.2082.

Drafted with Claude Code.

Done in `bd64102` — switched to `git 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 to `0.16.0-bd64102.2082`. _Drafted with Claude Code._
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!819
No description provided.