mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-31 02:18:00 +02:00
dev(ci): add nix version check to pre-release ci checks
This commit is contained in:
16
.github/workflows/make-release.yml
vendored
16
.github/workflows/make-release.yml
vendored
@@ -16,17 +16,33 @@ jobs:
|
|||||||
packages: "git"
|
packages: "git"
|
||||||
version: 1.0
|
version: 1.0
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-tags: true
|
||||||
|
|
||||||
- name: Check Version Changed
|
- name: Check Version Changed
|
||||||
id: check-ver-changed
|
id: check-ver-changed
|
||||||
run: |
|
run: |
|
||||||
GIT_TAG=$(git describe --no-long --abbrev=0 --tags --always)
|
GIT_TAG=$(git describe --no-long --abbrev=0 --tags --always)
|
||||||
|
|
||||||
MAKE_TAG=$(make print-version)
|
MAKE_TAG=$(make print-version)
|
||||||
|
NIX_VER=$(sed -nE \
|
||||||
|
's/.*version\s*=\s*"([0-9.]*)".*/\1/p' \
|
||||||
|
assets/pkg/nix/module.nix
|
||||||
|
)
|
||||||
|
|
||||||
if [[ "$GIT_TAG" == "v$MAKE_TAG" ]]; then
|
if [[ "$GIT_TAG" == "v$MAKE_TAG" ]]; then
|
||||||
echo "ERR: Git tag matches makefile, did you bump Makefile up?" >&2
|
echo "ERR: Git tag matches makefile, did you bump Makefile up?" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [[ "$GIT_TAG" == "v$NIX_VER" ]]; then
|
||||||
|
echo "ERR: Nix module version matches git, did you bump Nix up?" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! [[ "$NIX_VER" == "$MAKE_TAG" ]]; then
|
||||||
|
echo "ERR: Nix module version and make tag don't match" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "VERSION=$MAKE_TAG" >> "$GITHUB_OUTPUT"
|
echo "VERSION=$MAKE_TAG" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user