Commit 5fd9acc2 authored by Carola Nitz's avatar Carola Nitz

deployVLCKit: remove the build directory as well

(cherry picked from commit 919e9e3b)
parent 84e77bf8
...@@ -56,6 +56,7 @@ VLC_HASH="" ...@@ -56,6 +56,7 @@ VLC_HASH=""
VLCKIT_HASH="" VLCKIT_HASH=""
DISTRIBUTION_PACKAGE="" DISTRIBUTION_PACKAGE=""
DISTRIBUTION_PACKAGE_SHA="" DISTRIBUTION_PACKAGE_SHA=""
TARGET=""
################## ##################
# Helper methods # # Helper methods #
...@@ -124,20 +125,18 @@ getVLCHashes() ...@@ -124,20 +125,18 @@ getVLCHashes()
renamePackage() renamePackage()
{ {
local target=""
if [ "$1" = "-m" ]; then if [ "$1" = "-m" ]; then
target="MobileVLCKit" TARGET="MobileVLCKit"
else else
target="TVVLCKit" TARGET="TVVLCKit"
fi fi
getVLCHashes getVLCHashes
local packageName="${target}-REPLACEWITHVERSION.zip" local packageName="${TARGET}-REPLACEWITHVERSION.tar.xz"
# git rev-parse --short HEAD in vlckit et vlc
if [ -f $packageName ]; then if [ -f $packageName ]; then
DISTRIBUTION_PACKAGE="${target}-${VERSION}-${VLCKIT_HASH}-${VLC_HASH}.zip" DISTRIBUTION_PACKAGE="${TARGET}-${VERSION}-${VLCKIT_HASH}-${VLC_HASH}.tar.xz"
mv $packageName "$DISTRIBUTION_PACKAGE" mv $packageName "$DISTRIBUTION_PACKAGE"
log "Info" "Finished renaming package!" log "Info" "Finished renaming package!"
fi fi
...@@ -261,6 +260,14 @@ setCurrentPodspec() ...@@ -261,6 +260,14 @@ setCurrentPodspec()
fi fi
} }
removePackageAndBuildDir()
{
if ! podDeploy; then
log "info" "Removing distribution package ${DISTRIBUTION_PACKAGE} and build directory ${TARGET}-binary."
rm ${DISTRIBUTION_PACKAGE}
rm -rf ${TARGET}-binary
fi
}
################## ##################
# Command Center # # Command Center #
################## ##################
...@@ -288,9 +295,6 @@ spushd "$ROOT_DIR" ...@@ -288,9 +295,6 @@ spushd "$ROOT_DIR"
renamePackage $options renamePackage $options
getSHA getSHA
uploadPackage uploadPackage
if ! podDeploy; then removePackageAndBuildDir
log "Warning" "Removing distribution package."
rm ${DISTRIBUTION_PACKAGE}
fi
spopd #ROOT_DIR 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