diff options
author | Sam Betts <sam@code-smash.net> | 2016-03-30 17:11:47 +0100 |
---|---|---|
committer | Sam Betts <sam@code-smash.net> | 2016-05-12 13:57:00 +0100 |
commit | 29ba706fb9c2bc53c2593e249fdf1436cacd0999 (patch) | |
tree | 21b1f5b49002b11b66d548945127e977e5c7e436 | |
parent | e5d7313a475d11fc8909ca2d3a874bc2469f5cf2 (diff) | |
download | ironic-python-agent-29ba706fb9c2bc53c2593e249fdf1436cacd0999.tar.gz |
Enable branch tagging during tinyipa build
For publishing tinyipa from stable/branches we need to be able to place
branch references into the files created so that when they are uploaded
versions from different branches do not conflict. This change also adds
building a tar for publishing too.
Change-Id: I9d879689c8e88768aaa96d0033b62d062f9cdc27
(cherry picked from commit 90156c006db181634114e3acdf90885062a0aba5)
-rw-r--r-- | imagebuild/tinyipa/Makefile | 4 | ||||
-rwxr-xr-x | imagebuild/tinyipa/finalise-tinyipa.sh | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/imagebuild/tinyipa/Makefile b/imagebuild/tinyipa/Makefile index c134c5b0..50379651 100644 --- a/imagebuild/tinyipa/Makefile +++ b/imagebuild/tinyipa/Makefile @@ -21,8 +21,8 @@ clean_build: sudo -v sudo rm -rf tinyipabuild sudo rm -rf tinyipafinal - rm -f tinyipa.vmlinuz - rm -f tinyipa.gz + rm -f tinyipa*.vmlinuz + rm -f tinyipa*.gz rm -f build_files/corepure64.gz rm -f build_files/vmlinuz64 rm -f build_files/*.tcz diff --git a/imagebuild/tinyipa/finalise-tinyipa.sh b/imagebuild/tinyipa/finalise-tinyipa.sh index 054cc62b..f85bc234 100755 --- a/imagebuild/tinyipa/finalise-tinyipa.sh +++ b/imagebuild/tinyipa/finalise-tinyipa.sh @@ -88,8 +88,18 @@ sudo cp "$WORKDIR/build_files/bootlocal.sh" "$FINALDIR/opt/." # Disable ZSwap sudo sed -i '/# Main/a NOZSWAP=1' "$FINALDIR/etc/init.d/tc-config" +# Allow an extension to be added to the generated files by specifying +# $BRANCH_PATH e.g. export BRANCH_PATH=master results in tinyipa-master.gz etc +branch_ext='' +if [ -n "$BRANCH_PATH" ]; then + branch_ext="-$BRANCH_PATH" +fi + # Rebuild build directory into gz file -( cd "$FINALDIR" && sudo find | sudo cpio -o -H newc | gzip -9 > "$WORKDIR/tinyipa.gz" ) +( cd "$FINALDIR" && sudo find | sudo cpio -o -H newc | gzip -9 > "$WORKDIR/tinyipa${branch_ext}.gz" ) # Copy vmlinuz to new name -cp "$WORKDIR/build_files/vmlinuz64" "$WORKDIR/tinyipa.vmlinuz" +cp "$WORKDIR/build_files/vmlinuz64" "$WORKDIR/tinyipa${branch_ext}.vmlinuz" + +# Create tar.gz containing tinyipa files +tar czf tinyipa${branch_ext}.tar.gz tinyipa${branch_ext}.gz tinyipa${branch_ext}.vmlinuz |