improve tag script

This commit is contained in:
Eugenio Romano
2019-11-25 12:05:43 +00:00
parent 46e53105c2
commit 238f6e7ce9
2 changed files with 6 additions and 19 deletions

View File

@@ -89,7 +89,7 @@ jobs:
script: ./scripts/travis/update/update-children.sh
- stage: Release beta tag
script: ./scripts/travis/release/git-tag-beta.sh
script: ./scripts/travis/release/git-tag.sh
- stage: e2e Test
@@ -126,23 +126,6 @@ jobs:
name: Update Rancher PR
script: ./scripts/travis/deploy/deploy.sh
before_deploy:
if ![[ $TRAVIS_TAG ]]; then
git config --local user.name "Alfresco"
export TRAVIS_TAG=$(cat package.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')
echo "Create tag:" $TRAVIS_TAG
git tag $TRAVIS_TAG
fi
deploy:
provider: releases
api_key: $GITHUB_TOKEN
name: $TRAVIS_TAG
body: "Add the release note"
on:
branch: master
cache:
directories:
- node_modules

View File

@@ -1,6 +1,10 @@
#!/bin/bash
VERSION=$(npm view @alfresco/adf-core@beta version)
if [[ $TRAVIS_BRANCH == "master" ]]; then
TAG_VERSION=$(grep -m1 version package.json | awk '{ print $2 }' | sed 's/[", ]//g')
else
TAG_VERSION=$(npm view @alfresco/adf-core@beta version)
fi;
echo "git tag -a ${VERSION} -m ${VERSION}"
git config --local user.name "alfresco-build"