Commit 2380377c authored by Benoit Rat's avatar Benoit Rat

build: --pack command is modified to fit the "official" nomenclature on ohwr.org

The package will be named as following: <tag_name>-<date>_binaries.tar.gz
If the <tag_name> does not start with the "official" wr-switch-sw- prefix
a forced prefix 'wr-switch-sw-unof-' will be added.
Examples:
  * wr-switch-v3.3.1 => wr-switch-sw-v3.3.1-20130902_binaries.tar.gz
  * v3.1-rc1         => wr-switch-sw-unof-v3.1-rc1-20130521_binaries.tar.gz
parent cb25951e
......@@ -73,11 +73,12 @@ showhelp() {
pack()
{
#Check if the current git repo correspond to a tag
#if prefix 'wr-switch-sw-' is not set in tagname, we force it to 'wr-switch-sw-unof-'
cd $WRS_BASE_DIR
name=$(git describe --always --dirty)
name=$(git describe --always --dirty | sed '/^wr-switch-sw-/! s/.*/wr-switch-sw-unof-\0/')-$(date +%Y%m%d)_binaries.tar.gz
echo "Packing into wrs-firmware-$name.tar.gz";
tar -czvf "$WRS_OUTPUT_DIR/wrs-firmware-$name.tar.gz" -C ${WRS_OUTPUT_DIR}/images/ at91bootstrap.bin barebox.bin zImage wrs-image.tar.gz
echo "Packing into $name";
tar -czvf "$WRS_OUTPUT_DIR/$name" -C ${WRS_OUTPUT_DIR}/images/ at91bootstrap.bin barebox.bin zImage wrs-image.tar.gz
exit 0
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment