mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added the a Engineering Release stage and Company Release stage to travis.yml and added any required credentials to Travis. Each release stage is triggered by a specific commit message, as listed in the "stages" section of travis.yml. Provided a commit message to skip test stages if required, to speed up release process. Global variables have been added to set the release version, development version and the community release version for the release stages.
31 lines
1.1 KiB
Bash
Executable File
31 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
releaseVersion=$1
|
|
developmentVersion=$2
|
|
scm_path=$(mvn help:evaluate -Dexpression=project.scm.url -q -DforceStdout)
|
|
|
|
# Use full history for release
|
|
git checkout -B "${TRAVIS_BRANCH}"
|
|
# Add email to link commits to user
|
|
git config user.email "${GIT_EMAIL}"
|
|
|
|
if [ -z ${releaseVersion} ] || [ -z ${developmentVersion} ];
|
|
then echo "Please provide a Release and Development verison in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
|
|
exit -1
|
|
else
|
|
mvn --batch-mode \
|
|
-Dusername="${GIT_USERNAME}" \
|
|
-Dpassword="${GIT_PASSWORD}" \
|
|
-DreleaseVersion=${releaseVersion} \
|
|
-DdevelopmentVersion=${developmentVersion} \
|
|
-Dbuild-number=${TRAVIS_BUILD_NUMBER} \
|
|
-Dbuild-name="${TRAVIS_BUILD_STAGE_NAME}" \
|
|
-Dscm-path=${scm_path} \
|
|
-DscmCommentPrefix="[maven-release-plugin][skip ci]" \
|
|
-DskipTests \
|
|
"-Darguments=-DskipTests -Dbuild-number=${TRAVIS_BUILD_NUMBER} '-Dbuild-name=${TRAVIS_BUILD_STAGE_NAME}' -Dscm-path=${scm_path} " \
|
|
release:clean release:prepare release:perform \
|
|
-Prelease
|
|
fi
|