Skip to content
This repository has been archived by the owner on Oct 26, 2021. It is now read-only.

Commit

Permalink
ci-build: Create release-dir content
Browse files Browse the repository at this point in the history
If the environment CREATE_RELEASE_DIR is set to true, then set up
release dir with selected content from staging/ . Doing it here reduces
the amount of fiddling with files on the deployment side.  (The release
dir can be published for download as-is).

Signed-off-by: Gunnar Andersson <[email protected]>
  • Loading branch information
Gunnar Andersson committed Oct 23, 2017
1 parent ea1c2eb commit 65b2a69
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion scripts/ci-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ stop_if_failure
define_with_default BUILD_SDK false
define_with_default COPY_LICENSES false
define_with_default LAYER_ARCHIVE false
define_with_default CREATE_RELEASE_DIR false
define_with_default RM_WORK false
define_with_default REUSE_STANDARD_DL_DIR true
define_with_default REUSE_STANDARD_SSTATE_DIR true
Expand Down Expand Up @@ -166,8 +167,10 @@ if [[ "$REUSE_STANDARD_SSTATE_DIR" == "true" ]]; then
fi

if [[ "$STANDARD_RELEASE_BUILD" == "true" ]]; then
SOURCE_ARCHIVE=true # NOTE: override
SOURCE_ARCHIVE=true # NOTE: overriding env settings
COPY_LICENSES=true
LAYER_ARCHIVE=true
CREATE_RELEASE_DIR=true
fi

echo Configuration:
Expand Down Expand Up @@ -351,6 +354,23 @@ git diff gdp-src-build/conf/templates/*.inc >>$build_info_file
mkdir -p staging/images
mv staging/{*201*ext*,*201*rootfs*,*sdimg*,*hddimg*,bzImage*201*,*201*.iso,*.dtd} staging/images/ 2>/dev/null || true

if [[ "$CREATE_RELEASE_DIR" == "true" ]]; then
set +e
mkdir -p release
echo "Copying images to release/ (if it exists)"
cp staging/images/{*201*ext*,*201*rootfs*,*sdimg*,*hddimg*,bzImage*201*,*201*.iso,*.dtd} release/ 2>/dev/null || true
echo "Copying staging/sources to release/ (if it exists)"
cp -a staging/sources release/ 2>/dev/null
echo "Archiving licenses into release/ (if it exists)"
cd staging
tar cfj release/licenses.tar.bz2 licenses
cd ..
echo "Copying various metadata to release/ (if it exists)"
cp staging/files-in-image.txt release/ 2>/dev/null
cp staging/license.manifest release/ 2>/dev/null
set -e
fi

echo Artifacts in staging/
ls -R staging/

0 comments on commit 65b2a69

Please sign in to comment.