Skip to content

Commit

Permalink
[version] more systematic printing and not requiring git
Browse files Browse the repository at this point in the history
  • Loading branch information
OndrejSladky committed Oct 5, 2023
1 parent c4ebb0d commit af9754f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ converttest: convert_superstring_unittest.py
./convert_superstring_unittest.py

kmercamel: $(SRC)/main.cpp $(SRC)/$(wildcard *.cpp *.h *.hpp) src/version.h
./create-version.sh
$(CXX) $(CXXFLAGS) $(SRC)/main.cpp -o $@ $(LDFLAGS)
cp kmercamel 🐫 || true

Expand Down
2 changes: 1 addition & 1 deletion create-version.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env bash
cat <(echo "#define VERSION \"") src/version <(echo -) <(git rev-parse HEAD | head -c6) <(echo \") | tr -d '\n' > src/version.h
cat <(echo "#define VERSION \"") <(git describe --abbrev=4 --dirty --always --tags 2> /dev/null || cat src/version) <(echo \") | tr -d '\n' > src/version.h
2 changes: 1 addition & 1 deletion src/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2
v0.1

0 comments on commit af9754f

Please sign in to comment.