Commit a5e17bdf authored by Soomin Lee's avatar Soomin Lee Committed by Carola Nitz

deployVLCKit: Remove generated distribution package upon pod failure

Signed-off-by: 's avatarCarola Nitz <nitz.carola@googlemail.com>
(cherry picked from commit 43044bce2c3e9de231eb85917d0a8ee513937388)
parent aff23fec
......@@ -101,7 +101,7 @@ clean()
if [ -d "build" ]; then
rm -rf "$ROOT_DIR/build"
else
log "warning" "Build directory not found!"
log "Warning" "Build directory not found!"
fi
log "Info" "Build directory cleaned"
}
......@@ -110,7 +110,7 @@ buildMobileVLCKit()
{
log "Info" "Staring MobileVLCKit build..."
if ! $BUILD_MOBILEVLCKIT; then
log "error" "MobileVLCKit build failed"
log "Error" "MobileVLCKit build failed"
exit 1
fi
log "Info" "MobileVLCKit build finished!"
......@@ -138,6 +138,7 @@ renamePackage()
getVLCHashes
local packageName="${target}-REPLACEWITHVERSION.tar.xz"
# git rev-parse --short HEAD in vlckit et vlc
if [ -f $packageName ]; then
......@@ -194,15 +195,20 @@ podDeploy()
podspec="TVVLCKit-unstable.podspec"
fi
log "Info" "Starting podspec operations..."
spushd "Packaging/podspecs"
log "Info" "Starting podspec update..."
bumpPodspec $podspec
log "Info" "Starting pod spec lint..."
pod spec lint --verbose $podspec
log "Info" "Starting pod trunk push..."
pod trunk push $podspec
gitCommit $podspec
spopd #Packaging/podspecs
if bumpPodspec $podspec && \
pod spec lint --verbose $podspec && \
pod trunk push $podspec && \
gitCommit $podspec ; then
spopd
log "Info" "Podpsec operations successfully finished!"
return 0
else
spopd
log "Error" "Podspec operations failed, removing generated package."
return 1
fi
}
checkIfExistOnRemote()
......@@ -270,6 +276,8 @@ spushd "$ROOT_DIR"
renamePackage $options
getSHA
uploadPackage
podDeploy
if ! podDeploy; then
rm ${DISTRIBUTION_PACKAGE}
fi
spopd #ROOT_DIR
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