]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/Cryptoportfolio/Trader.git/commitdiff
Add build_release in Makefile
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 4 Mar 2018 18:35:12 +0000 (19:35 +0100)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 4 Mar 2018 18:35:12 +0000 (19:35 +0100)
Makefile

index f811376c525dcc497702979eba34fb53e8bb8f81..dfbe3b46234cd4f3e5cd93260a9b68f87e58b25d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,19 @@ test:
 run:
        python portfolio.py
 
+release_version = $(shell git describe --tags --always)
+release_file = trader_$(release_version).tar.gz
+folder = ~/.no_backup/projets/git.immae.eu/releases/cryptoportfolio/trader
+
+build_release:
+       git archive HEAD -o $(release_file)
+       mv $(release_file) $(folder)
+       @echo "====== Version information ======"
+       @echo "$(release_version)"
+       @echo -n "sha256: "
+       @sha256sum $(folder)/$(release_file) | cut -d' ' -f1
+       @echo "================================="
+
 test_coverage_unit:
        coverage run --source=. --omit=test.py test.py --onlyunit
        coverage report -m