Skip to content

Commit

Permalink
fixes version option
Browse files Browse the repository at this point in the history
  • Loading branch information
wookietreiber committed Jul 19, 2018
1 parent 1925232 commit 664366d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 9 additions & 0 deletions .version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/sh

version=$(git describe --always --dirty 2> /dev/null | sed 's/^v//')

if [ -n "$version" ] ; then
echo "$version"
else
echo "1.1.1"
fi
6 changes: 2 additions & 4 deletions meson.build
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
project(
'archive-sum',
'c',
version: run_command('git', 'describe', '--always', '--dirty').stdout().strip(),
project('archive-sum', 'c',
license: ['MIT'],
version: run_command('sh', '.version.sh').stdout().strip(),
default_options: ['c_std=gnu11']
)

Expand Down

0 comments on commit 664366d

Please # to comment.