mirror of
https://github.com/Alfresco/acs-community-packaging.git
synced 2026-09-16 18:13:21 +00:00
Clean variables + comments [skip ci]
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [ ${COMM_RELEASE_VERSION} = "" ];
|
||||
if [ -z ${COMM_RELEASE_VERSION} ] || [ -z ${RELEASE_VERSION} ];
|
||||
then
|
||||
echo "Please provide a COMM_RELEASE_VERSION and Development verison in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
@@ -13,4 +14,4 @@ SOURCE=s3://alfresco-artefacts-staging/alfresco-content-services-community/$buil
|
||||
DESTINATION=s3://eu.dl.alfresco.com/release/community/$COMM_RELEASE_VERSION-build-$build_number
|
||||
|
||||
aws s3 cp --acl private $SOURCE/alfresco.war $DESTINATION/alfresco.war
|
||||
aws s3 cp --acl private $SOURCE/alfresco-content-services-community-distribution-$release_version.zip $DESTINATION/alfresco-content-services-community-distribution-$release_version.zip
|
||||
aws s3 cp --acl private $SOURCE/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip $DESTINATION/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ev
|
||||
|
||||
if [ -z ${release_version} ];
|
||||
if [ -z ${RELEASE_VERSION} ];
|
||||
then
|
||||
exit -1
|
||||
fi
|
||||
@@ -10,4 +10,4 @@ DEPLOYMENT_DIR=deploy_dir
|
||||
|
||||
mkdir $DEPLOYMENT_DIR -p
|
||||
cp war/target/alfresco.war ${DEPLOYMENT_DIR}
|
||||
cp distribution/target/alfresco-content-services-community-distribution-$release_version.zip ${DEPLOYMENT_DIR}
|
||||
cp distribution/target/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip ${DEPLOYMENT_DIR}
|
||||
@@ -3,16 +3,16 @@ set -e
|
||||
|
||||
# get the image name from the pom file
|
||||
alfresco_docker_image=$(mvn help:evaluate -f ./docker-alfresco/pom.xml -Dexpression=image.name -q -DforceStdout)
|
||||
if [ -v ${release_version} ]||[ -z ${release_version} ]; then
|
||||
if [ -v ${RELEASE_VERSION} ]||[ -z ${RELEASE_VERSION} ]; then
|
||||
# if we don't have a user added release version, get the verison from the pom
|
||||
pom_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
|
||||
if echo $pom_version | grep -q ".*-SNAPSHOT"; then
|
||||
release_version=${pom_version%-*} # remove everything after the last '-'
|
||||
RELEASE_VERSION=${pom_version%-*} # remove everything after the last '-'
|
||||
else
|
||||
release_version=$pom_version
|
||||
RELEASE_VERSION=$pom_version
|
||||
fi
|
||||
fi
|
||||
docker_image_full_name="$alfresco_docker_image:$release_version"
|
||||
docker_image_full_name="$alfresco_docker_image:$RELEASE_VERSION"
|
||||
|
||||
function docker_image_exists() {
|
||||
local image_full_name="$1"; shift
|
||||
@@ -29,8 +29,8 @@ function docker_image_exists() {
|
||||
}
|
||||
|
||||
if docker_image_exists $docker_image_full_name; then
|
||||
echo "Tag $release_version already pushed, release process will interrupt."
|
||||
echo "Tag $RELEASE_VERSION already pushed, release process will interrupt."
|
||||
exit -1
|
||||
else
|
||||
echo "The $release_version tag was not found"
|
||||
echo "The $RELEASE_VERSION tag was not found"
|
||||
fi
|
||||
Reference in New Issue
Block a user