← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/lp-signing:version-info into lp-signing:master

 

Colin Watson has proposed merging ~cjwatson/lp-signing:version-info into lp-signing:master.

Commit message:
Add version-info.txt to deployment artifact

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/lp-signing/+git/lp-signing/+merge/381665

Talisker and ols-layers can both make use of this.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/lp-signing:version-info into lp-signing:master.
diff --git a/.gitignore b/.gitignore
index 4653353..8fe877c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,5 +7,6 @@
 /env
 /htmlcov
 /tmp
+/version-info.txt
 /wheels
 __pycache__
diff --git a/Makefile b/Makefile
index 0888013..0fc6bdd 100644
--- a/Makefile
+++ b/Makefile
@@ -40,6 +40,7 @@ SWIFT_OBJECT_PATH = \
 $(ENV)/prod: | $(DEPENDENCY_DIR)
 	virtualenv $(ENV) --python=python3
 	$(PIP) install -f $(DEPENDENCY_DIR) --no-index -c requirements.txt -e .
+	git rev-parse HEAD >version-info.txt
 	@touch $@
 
 $(DEPENDENCY_DIR):
@@ -72,7 +73,7 @@ coverage: $(ENV)/dev
 	$(PYTHON3) -m coverage html
 
 clean:
-	rm -rf $(ENV) $(WHEELS)
+	rm -rf $(ENV) $(WHEELS) version-info.txt
 	rm -rf $(TMPDIR)
 	rm -rf .coverage htmlcov
 	find -name '__pycache__' -print0 | xargs -0 rm -rf