mirror of
https://github.com/lineageos4microg/docker-lineage-cicd
synced 2024-11-09 10:09:56 +01:00
Add ZIP_SUBDIR
This commit is contained in:
parent
a0469e094e
commit
0cc32390fa
@ -63,6 +63,9 @@ ENV CUSTOM_PACKAGES ''
|
|||||||
# Key path (from the root of the android source)
|
# Key path (from the root of the android source)
|
||||||
ENV KEYS_DIR ''
|
ENV KEYS_DIR ''
|
||||||
|
|
||||||
|
# Move the resulting zips to $ZIP_DIR/$codename instead of $ZIP_DIR/
|
||||||
|
ENV ZIP_SUBDIR false
|
||||||
|
|
||||||
# Create Volume entry points
|
# Create Volume entry points
|
||||||
############################
|
############################
|
||||||
|
|
||||||
|
14
src/build.sh
14
src/build.sh
@ -76,14 +76,20 @@ if ! [ -z "$DEVICE_LIST" ]; then
|
|||||||
IFS=','
|
IFS=','
|
||||||
for codename in $DEVICE_LIST; do
|
for codename in $DEVICE_LIST; do
|
||||||
if ! [ -z "$codename" ]; then
|
if ! [ -z "$codename" ]; then
|
||||||
|
if [ "$ZIP_SUBDIR" = true ]; then
|
||||||
|
zipsubdir=$codename
|
||||||
|
mkdir -p $ZIP_DIR/$zipsubdir
|
||||||
|
else
|
||||||
|
zipsubdir=
|
||||||
|
fi
|
||||||
# Start the build
|
# Start the build
|
||||||
if [ -z "$KEYS_DIR" ]; then
|
if [ -z "$KEYS_DIR" ]; then
|
||||||
echo ">> [$(date)] Starting build for $codename" >> $DOCKER_LOG
|
echo ">> [$(date)] Starting build for $codename" >> $DOCKER_LOG
|
||||||
if brunch $codename 2>&1 >&$DEBUG_LOG; then
|
if brunch $codename 2>&1 >&$DEBUG_LOG; then
|
||||||
# Move produced ZIP files to the main OUT directory
|
# Move produced ZIP files to the main OUT directory
|
||||||
echo ">> [$(date)] Moving build artifacts for $codename to '$ZIP_DIR'" >> $DOCKER_LOG
|
echo ">> [$(date)] Moving build artifacts for $codename to '$ZIP_DIR/$zipsubdir'" >> $DOCKER_LOG
|
||||||
cd $SRC_DIR
|
cd $SRC_DIR
|
||||||
find out/target/product/$codename -name '*UNOFFICIAL*.zip*' -exec sh -c 'sha256sum {} > $ZIP_DIR/{}.sha256sum && mv {} $ZIP_DIR' \; >&$DEBUG_LOG
|
find out/target/product/$codename -name '*UNOFFICIAL*.zip*' -exec sh -c 'sha256sum {} > $ZIP_DIR/$zipsubdir/{}.sha256sum && mv {} $ZIP_DIR/$zipsubdir/' \; >&$DEBUG_LOG
|
||||||
else
|
else
|
||||||
echo ">> [$(date)] Failed build for $codename" >> $DOCKER_LOG
|
echo ">> [$(date)] Failed build for $codename" >> $DOCKER_LOG
|
||||||
fi
|
fi
|
||||||
@ -99,8 +105,8 @@ if ! [ -z "$DEVICE_LIST" ]; then
|
|||||||
$SRC_DIR/out/dist/lineage_$codename-signed_target_files.zip 2>&1 >&$DEBUG_LOG && \
|
$SRC_DIR/out/dist/lineage_$codename-signed_target_files.zip 2>&1 >&$DEBUG_LOG && \
|
||||||
$SRC_DIR/build/tools/releasetools/ota_from_target_files -k $SRC_DIR/$KEYS_DIR/releasekey --block --backup=true \
|
$SRC_DIR/build/tools/releasetools/ota_from_target_files -k $SRC_DIR/$KEYS_DIR/releasekey --block --backup=true \
|
||||||
$SRC_DIR/out/dist/lineage_$codename-signed_target_files.zip \
|
$SRC_DIR/out/dist/lineage_$codename-signed_target_files.zip \
|
||||||
$ZIP_DIR/lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip 2>&1 >&$DEBUG_LOG; then
|
$ZIP_DIR/$zipsubdir/lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip 2>&1 >&$DEBUG_LOG; then
|
||||||
cd $ZIP_DIR
|
cd $ZIP_DIR/$zipsubdir
|
||||||
md5sum lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip > lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip.md5sum
|
md5sum lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip > lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip.md5sum
|
||||||
sha256sum lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip > lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip.sha256sum
|
sha256sum lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip > lineage-14.1-$builddate-UNOFFICIAL-$codename-signed.zip.sha256sum
|
||||||
cd $SRC_DIR
|
cd $SRC_DIR
|
||||||
|
Loading…
Reference in New Issue
Block a user