Browse Source

Refactoring makefile and top level go script

Jim Barritt 11 months ago
parent
commit
9949a497f7
2 changed files with 6 additions and 2 deletions
  1. 5 1
      apps/petitions/decode-app/Makefile
  2. 1 1
      apps/petitions/decode-app/go.sh

+ 5 - 1
apps/petitions/decode-app/Makefile

@@ -1,4 +1,8 @@
1
-.SILENT: status
1
+# https://stackoverflow.com/questions/4219255/how-do-you-get-the-list-of-targets-in-a-makefile
2
+.PHONY: list
3
+list:
4
+	@echo "Available commands:"
5
+	@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs
2 6
 
3 7
 status:
4 8
 	./ops/local/mongo.sh status

+ 1 - 1
apps/petitions/decode-app/go.sh

@@ -109,7 +109,7 @@ start() {
109 109
       ENV=development java -jar target/decode-app-0.1.0-SNAPSHOT-standalone.jar &
110 110
       SERVICE=decode_app
111 111
       wait_for_service
112
-      echo "Running Decode app in the background. To kill run ./go.sh stop"
112
+      echo "Running Decode app in the background. To kill run ./original-go.sh stop"
113 113
       ;;
114 114
     prod)
115 115
       prepare_decode_app_artefact