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=""
VLCKIT_HASH=""
DISTRIBUTION_PACKAGE=""
DISTRIBUTION_PACKAGE_SHA=""
TARGET=""
##################
# Helper methods #
......@@ -124,20 +125,18 @@ getVLCHashes()
renamePackage()
{
local target=""
if [ "$1" = "-m" ]; then
target="MobileVLCKit"
TARGET="MobileVLCKit"
else
target="TVVLCKit"
TARGET="TVVLCKit"
fi
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
DISTRIBUTION_PACKAGE="${target}-${VERSION}-${VLCKIT_HASH}-${VLC_HASH}.zip"
DISTRIBUTION_PACKAGE="${TARGET}-${VERSION}-${VLCKIT_HASH}-${VLC_HASH}.tar.xz"
mv $packageName "$DISTRIBUTION_PACKAGE"
log "Info" "Finished renaming package!"
fi
......@@ -261,6 +260,14 @@ setCurrentPodspec()
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 #
##################
......@@ -288,9 +295,6 @@ spushd "$ROOT_DIR"
renamePackage $options
getSHA
uploadPackage
if ! podDeploy; then
log "Warning" "Removing distribution package."
rm ${DISTRIBUTION_PACKAGE}
fi
removePackageAndBuildDir
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