Merge branch 'feature/issue-333' into 'master'
Feature/issue-333 See merge request touchinstinct/BuildScripts!2
This commit is contained in:
commit
d83a3628e4
|
|
@ -19,8 +19,9 @@ if [ -z "${GIT_BRANCH}" ]; then
|
|||
GIT_BRANCH="master"
|
||||
fi
|
||||
|
||||
LAST_COMMIT_DATE=""
|
||||
PROJECT_NAME=$1
|
||||
SRC_FOLDER_NAME="${PROJECT_NAME}-src-$(date +%F)"
|
||||
SRC_FOLDER_NAME="${PROJECT_NAME}-src"
|
||||
SRC_DIR="./${SRC_FOLDER_NAME}"
|
||||
|
||||
COMMAND_LINE_ARGUMENTS=$@
|
||||
|
|
@ -28,8 +29,19 @@ COMMAND_LINE_ARGUMENTS=$@
|
|||
clone_platform() {
|
||||
PROJECT_NAME=$1
|
||||
PLATFORM=$2
|
||||
|
||||
git clone --recurse-submodules -j8 "git@github.com:TouchInstinct/${PROJECT_NAME}-${PLATFORM}.git" --branch "${GIT_BRANCH}"
|
||||
|
||||
if git clone --recurse-submodules -j8 "git@gitlab.ti:touchinstinct/${PROJECT_NAME}-${PLATFORM}.git" --branch "${GIT_BRANCH}"; then
|
||||
cd ${PROJECT_NAME}-${PLATFORM}
|
||||
|
||||
COMMIT_DATE=`git log -1 --pretty='format:%cd' --date=format:'%Y-%m-%d'`
|
||||
if [[ $LAST_COMMIT_DATE < $COMMIT_DATE ]]; then
|
||||
LAST_COMMIT_DATE="${COMMIT_DATE}"
|
||||
fi
|
||||
|
||||
cd ..
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
mkdir -p "${SRC_DIR}"
|
||||
|
|
@ -43,7 +55,11 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
if [ -z "${EXPORT_DATE}" ]; then
|
||||
EXPORT_DATE="${LAST_COMMIT_DATE}"
|
||||
fi
|
||||
|
||||
find . -name ".git*" -print0 | xargs -0 rm -rf
|
||||
zip -r -q ${SRC_FOLDER_NAME}.zip .
|
||||
zip -r -q "${SRC_FOLDER_NAME}-${EXPORT_DATE}".zip .
|
||||
|
||||
open .
|
||||
|
|
|
|||
Loading…
Reference in New Issue