mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
improve tag script
This commit is contained in:
19
.travis.yml
19
.travis.yml
@@ -89,7 +89,7 @@ jobs:
|
|||||||
script: ./scripts/travis/update/update-children.sh
|
script: ./scripts/travis/update/update-children.sh
|
||||||
|
|
||||||
- stage: Release beta tag
|
- stage: Release beta tag
|
||||||
script: ./scripts/travis/release/git-tag-beta.sh
|
script: ./scripts/travis/release/git-tag.sh
|
||||||
|
|
||||||
|
|
||||||
- stage: e2e Test
|
- stage: e2e Test
|
||||||
@@ -126,23 +126,6 @@ jobs:
|
|||||||
name: Update Rancher PR
|
name: Update Rancher PR
|
||||||
script: ./scripts/travis/deploy/deploy.sh
|
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:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- node_modules
|
- node_modules
|
||||||
|
@@ -1,6 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/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}"
|
echo "git tag -a ${VERSION} -m ${VERSION}"
|
||||||
git config --local user.name "alfresco-build"
|
git config --local user.name "alfresco-build"
|
Reference in New Issue
Block a user