Skip to content

Commit

Permalink
fix(version-number): commit count
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbr committed Dec 17, 2023
1 parent 092b423 commit 34eda45
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/run_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
id: version
shell: pwsh
run: |
$LATEST_TAG = git describe --tags --abbrev=0 # Get the latest tag name
$COMMIT_COUNT = git rev-list --use-bitmap-index --count $(git rev-list --tags --no-walk --max-count=1)..HEAD # Count all commits since the last tag
$NIXOS_WSL_VERSION = "$($LATEST_TAG -replace '(.+)\.(.+)\.(.+)\..+', '$1.$2.$3').${COMMIT_COUNT}" # Compose the NixOS-WSL version number
$LATEST_TAG = git describe --tags --abbrev=0 # Get the latest tag name
$COMMIT_COUNT = git rev-list --use-bitmap-index --count "$(git rev-list --tags --no-walk --max-count=1)..HEAD" # Count all commits since the last tag
$NIXOS_WSL_VERSION = "$($LATEST_TAG -replace '(.+)\.(.+)\.(.+)\..+', '$1.$2.$3').${COMMIT_COUNT}" # Compose the NixOS-WSL version number
echo "version=$NIXOS_WSL_VERSION" >> $env:GITHUB_OUTPUT
echo $NIXOS_WSL_VERSION > ./VERSION
Expand Down

0 comments on commit 34eda45

Please sign in to comment.