mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-20 03:35:41 +02:00
generate-version: handle builds that aren't git clones
This commit is contained in:
parent
199a7ccd21
commit
6c12ea3811
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ out_file=${3}
|
||||||
# echo "source directory: ${src_dir}"
|
# echo "source directory: ${src_dir}"
|
||||||
# echo "output file: ${out_file}"
|
# echo "output file: ${out_file}"
|
||||||
|
|
||||||
if command -v git > /dev/null; then
|
if command -v git > /dev/null && git rev-parse --is-inside-work-tree 2> /dev/null; then
|
||||||
workdir=$(pwd)
|
workdir=$(pwd)
|
||||||
cd "${src_dir}"
|
cd "${src_dir}"
|
||||||
git_version=$(git describe --always --tags)
|
git_version=$(git describe --always --tags)
|
||||||
|
|
Loading…
Add table
Reference in a new issue