mirror of
https://github.com/servalproject/serval-dna.git
synced 2024-12-18 20:57:56 +00:00
version_string.sh uses VERSION.txt if not in a Git repo
This commit is contained in:
parent
30590ab140
commit
8e9440860b
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,6 +7,7 @@
|
||||
*.a
|
||||
*.suo
|
||||
.*.sw?
|
||||
VERSION.txt
|
||||
configure
|
||||
autom4te.cache
|
||||
Makefile
|
||||
|
@ -99,12 +99,14 @@ sqlite-amalgamation-3070900/sqlite3.o: sqlite-amalgamation-3070900/sqlite3.c
|
||||
@echo CC $<
|
||||
@$(CC) $(CFLAGS) $(DEFS) -c $< -o sqlite-amalgamation-3070900/sqlite3.o
|
||||
|
||||
version.o: *.h *.c version_string.sh COPYRIGHT.txt Makefile
|
||||
version.o: *.h *.c version_string.sh VERSION.txt COPYRIGHT.txt Makefile
|
||||
@echo CC version_servald.c
|
||||
@V=`./version_string.sh --ignore-untracked` \
|
||||
&& C="`sed -e :a -e N -e '$$!ba' -e 's/[\\\\"]/\\\\&/g' -e 's/\\n/\\\\n/g' COPYRIGHT.txt`" \
|
||||
&& $(CC) -c version_servald.c -o $@ -DSERVALD_VERSION="\"$$V\"" -DSERVALD_COPYRIGHT="\"$$C\""
|
||||
|
||||
VERSION.txt:
|
||||
|
||||
%.o: %.c
|
||||
@echo CC $<
|
||||
@$(CC) $(CFLAGS) $(DEFS) -c $< -o $@
|
||||
|
@ -99,8 +99,12 @@ esac
|
||||
cd "$repo_path" >/dev/null
|
||||
|
||||
if [ ! -d .git ]; then
|
||||
echo "UNKNOWN-VERSION"
|
||||
exit 0
|
||||
if [ -s VERSION.txt ] && [ $(cat VERSION.txt | wc -l) -eq 1 ]; then
|
||||
cat VERSION.txt
|
||||
else
|
||||
echo "UNKNOWN-VERSION"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
get_author_label() {
|
||||
|
Loading…
Reference in New Issue
Block a user