Skip to content

Commit dc60c2f

Browse files
committed
release script
1 parent e663546 commit dc60c2f

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,25 @@ endif
552552
version:
553553
@$(MULTILINE_ECHO) " $(foreach mod, $(ALL_MODS), $(mod): $($(mod)_VERSION)\n)"
554554

555+
###############################################################################
556+
# performs a firmware release
557+
release:
558+
@echo If you continue you will lost:
559+
@echo " * Ignored files from repo"
560+
@echo " * not commited changes"
561+
@echo " * the file ../Firmware.zip will be overwritten"
562+
@echo " * the file ../Firmware.tar.gz will be overwritten"
563+
@echo
564+
@read -p "you may want to press CTRL-C to cancel or any other key to continue... " y
565+
@echo Cleaning
566+
git clean -xdf
567+
@echo Removing ../Firmware.zip
568+
rm -f ../Firmware.zip
569+
@echo Generating ../Firmware.zip
570+
zip -r ../Firmware.zip . -x *.git*
571+
@echo -f Removing ../Firmware.tar.gz
572+
tar -zcvf ../Firmware.tar.gz --exclude "*.git*" .
573+
555574
###############################################################################
556575
# help
557576
help:
@@ -563,6 +582,7 @@ help:
563582
@echo info_\<mod\>..........: same as info but reporting information of a library
564583
@echo info_ext_\<mod\>......: same as info_\<mod\> but for an external library
565584
@echo version.............: dislpays the version of each module
585+
@echo release.............: performs a firmware release (do not use it)
566586
@echo "+-----------------------------------------------------------------------------+"
567587
@echo "| FreeOSEK (CIAA RTOS based on OSEK Standard) |"
568588
@echo "+-----------------------------------------------------------------------------+"

0 commit comments

Comments
 (0)