Tomáš Mládek
77eccc5bb6
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Obviously, we don't push the .git repo directory inside the build containers, so the build has no way of telling the version. But it's nice we got it working.
9 lines
189 B
Bash
Executable file
9 lines
189 B
Bash
Executable file
#!/bin/sh
|
|
|
|
git_tag=$(git describe --tags --exact-match HEAD 2>/dev/null)
|
|
|
|
if [ -z "$git_tag" ]; then
|
|
echo "dev_$(git rev-parse --short HEAD)"
|
|
else
|
|
echo "$git_tag" | sed -e 's/^v//g'
|
|
fi
|