File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed
Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -11,12 +11,13 @@ export BINARY_PATH = `stack path --local-install-root`/bin/${PROJECT_NAME}-exe
1111
1212BINARY_NAME = ${PROJECT_NAME}-exe
1313
14+ # # Build binary
1415build :
1516 @stack build
1617 @echo " \nBinary available at:\n"
1718 @echo ${BINARY_PATH}
1819
19-
20+ # # Helper for local testing
2021run :
2122 @${BINARY_PATH} \
2223 --statements-dir ` pwd` /statements \
2526 --currency HRK \
2627 --debug
2728
29+ # # Build static binary
2830static-build : clean
2931 @mkdir -p release/build
3032 @stack ghc -- \
@@ -42,10 +44,24 @@ static-build: clean
4244 -hidir release/build \
4345 -o release/${BINARY_NAME} -${VERSION} -linux-${ARCH}
4446
47+ # # Clean
4548clean :
4649 @rm -rf release
4750
48- release : static-build
49- @echo " \n\nRelease available at:\n"
50- @echo " STATIC BINARY: ` pwd` /release/{BINARY_NAME}-${VERSION} -linux-${ARCH} \n"
51+ # # Cut new release
52+ release :
53+ @git tag ${VERSION} && git push --tags
54+
55+ # # Show help screen.
56+ help :
57+ @echo " Please use \` make <target>' where <target> is one of\n\n"
58+ @awk ' /^[a-zA-Z\-\_0-9]+:/ { \
59+ helpMessage = match(lastLine, /^# # (.*)/); \
60+ if (helpMessage) { \
61+ helpCommand = substr($$ 1, 0, index($$ 1, " :" )-1); \
62+ helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
63+ printf " %-30s %s\n" , helpCommand, helpMessage; \
64+ } \
65+ } \
66+ { lastLine = $$ 0 }' $(MAKEFILE_LIST)
5167
You can’t perform that action at this time.
0 commit comments