build: Fix up version.sh

This commit is contained in:
mintsuki 2022-01-16 06:34:15 +01:00
parent 3bb70dcbee
commit 4fd8fd10f9
3 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,7 @@ jobs:
uses: actions/checkout@v2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install git build-essential nasm curl mtools -y
run: sudo apt-get update && sudo apt-get install git build-essential autoconf nasm curl mtools -y
- name: Build the bootloader
run: ./autogen.sh && make all

View File

@ -23,7 +23,7 @@ jobs:
run: echo "BRANCH_NAME=$(echo "$TAG_NAME" | grep -o 'v[0-9]\+\.')0-branch" >> $GITHUB_ENV
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install git build-essential nasm gcc-mingw-w64 gcc-multilib curl mtools -y
run: sudo apt-get update && sudo apt-get install git build-essential autoconf nasm gcc-mingw-w64 gcc-multilib curl mtools -y
- name: Regenerate
run: NOCONFIGURE=yes ./autogen.sh

View File

@ -1,3 +1,4 @@
#!/bin/sh
cat version 2>/dev/null || ( git describe --exact-match --tags `git log -n1 --pretty='%h'` 2>/dev/null || git log -n1 --pretty='%h' )
[ -f version ] || ( git describe --exact-match --tags $(git log -n1 --pretty='%h') 2>/dev/null || git log -n1 --pretty='%h' ) | xargs printf '%s'
[ -f version ] && ( cat version 2>/dev/null ) | xargs printf '%s'