Created
December 9, 2019 00:08
-
-
Save attie/6bd965913c2f1494d0ce6d95b0206e21 to your computer and use it in GitHub Desktop.
Make release, for microcontroller projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VERSION_SHORT:=$(shell git describe --dirty=+ 2>/dev/null || echo "unknown") | |
release: main.hex | |
tar -caf $(PROJECT_NAME)_binary_$(VERSION_SHORT).tgz --xform 's!^!$(PROJECT_NAME)_$(VERSION_SHORT)/!' main.elf main.hex main.map | |
git archive HEAD --format tar.gz --prefix $(PROJECT_NAME)_$(VERSION_SHORT)/ > $(PROJECT_NAME)_$(VERSION_SHORT).tgz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment