mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
Bump lib version after build (#7941)
This commit is contained in:
parent
0b0174ced4
commit
8ca604e250
@ -109,6 +109,8 @@ jobs:
|
|||||||
name: "Lib::Build"
|
name: "Lib::Build"
|
||||||
script:
|
script:
|
||||||
- nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell"
|
- nx affected:build $NX_CALCULATION_FLAGS --prod --exclude="demoshell"
|
||||||
|
- ./scripts/travis/build/bumpversion.sh || travis_terminate 1
|
||||||
|
|
||||||
workspaces:
|
workspaces:
|
||||||
create:
|
create:
|
||||||
name: built_libs_cache
|
name: built_libs_cache
|
||||||
@ -173,7 +175,6 @@ jobs:
|
|||||||
- stage: "Release"
|
- stage: "Release"
|
||||||
name: "release::npm"
|
name: "release::npm"
|
||||||
script:
|
script:
|
||||||
- ./scripts/travis/release/prepublish.sh || travis_terminate 1
|
|
||||||
- ./scripts/travis/release/release-npm.sh || travis_terminate 1
|
- ./scripts/travis/release/release-npm.sh || travis_terminate 1
|
||||||
workspaces:
|
workspaces:
|
||||||
use: built_libs_cache
|
use: built_libs_cache
|
||||||
|
@ -300,7 +300,7 @@
|
|||||||
"sourceRoot": "lib/core/src",
|
"sourceRoot": "lib/core/src",
|
||||||
"prefix": "adf",
|
"prefix": "adf",
|
||||||
"architect": {
|
"architect": {
|
||||||
"build": {
|
"build-lib": {
|
||||||
"builder": "@angular-devkit/build-angular:ng-packagr",
|
"builder": "@angular-devkit/build-angular:ng-packagr",
|
||||||
"options": {
|
"options": {
|
||||||
"tsConfig": "lib/core/tsconfig.lib.json",
|
"tsConfig": "lib/core/tsconfig.lib.json",
|
||||||
|
@ -71,7 +71,7 @@ async function npmPublish(args: PublishArgs, project: string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function npmCheckExist(project: string, version: string) {
|
function npmCheckExist(project: string, version: string) {
|
||||||
logger.info(`Check if lib ${project} is already in npm`);
|
logger.info(`Check if lib ${project} is already in npm with version ${version}`);
|
||||||
|
|
||||||
const exist = exec(`npm`, [`view`, `@alfresco/adf-${project}@${version} version`] );
|
const exist = exec(`npm`, [`view`, `@alfresco/adf-${project}@${version} version`] );
|
||||||
|
|
||||||
|
@ -10,6 +10,10 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
"url": "https://github.com/Alfresco/alfresco-ng2-components/issues"
|
||||||
},
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "nx run core:build-lib",
|
||||||
|
"postbuild": "nx run core:pretheme"
|
||||||
|
},
|
||||||
"exports": {
|
"exports": {
|
||||||
"./theming": {
|
"./theming": {
|
||||||
"sass": "./lib/theming/_index.scss"
|
"sass": "./lib/theming/_index.scss"
|
||||||
|
@ -83,6 +83,7 @@ fi
|
|||||||
if [[ "${EXEC_ALPHA}" == true ]]
|
if [[ "${EXEC_ALPHA}" == true ]]
|
||||||
then
|
then
|
||||||
NEXT_VERSION=${NEXT_VERSION}-${TRAVIS_BUILD_NUMBER}
|
NEXT_VERSION=${NEXT_VERSION}-${TRAVIS_BUILD_NUMBER}
|
||||||
|
echo "version "$NEXT_VERSION
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "${EXEC_BETA}" == true ]]
|
if [[ "${EXEC_BETA}" == true ]]
|
||||||
|
14
scripts/travis/build/bumpversion.sh
Executable file
14
scripts/travis/build/bumpversion.sh
Executable file
@ -0,0 +1,14 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
cd $DIR/../../../
|
||||||
|
|
||||||
|
if [[ $TRAVIS_BRANCH =~ ^develop(-patch.*)?$ ]]
|
||||||
|
then
|
||||||
|
echo "Replace NPM version with new Alpha tag"
|
||||||
|
NEXT_VERSION=-nextalpha
|
||||||
|
./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1;
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
||||||
|
|
||||||
cd $DIR/../../../
|
|
||||||
|
|
||||||
if [[ $TRAVIS_BRANCH =~ ^develop(-patch.*)?$ ]]
|
|
||||||
then
|
|
||||||
isSameADFSha=$(node ./scripts/travis/update/adf-same-commit-verify.js --token=$TOKEN --head=$BRANCH_TO_CREATE --repo=$NAME_REPO --commit=$COMMIT )
|
|
||||||
if [ "$isSameADFSha" = 'true' ]; then
|
|
||||||
echo 'ADF sha is the same. No need to publish again on NPM'
|
|
||||||
else
|
|
||||||
echo "Replace NPM version with new Alpha tag"
|
|
||||||
NEXT_VERSION=-nextalpha
|
|
||||||
./scripts/update-version.sh -gnu $NEXT_VERSION || exit 1;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
node ./scripts/pre-publish.js
|
|
||||||
|
|
||||||
echo "====== Prebuilt Themes ====="
|
|
||||||
nx affected $NX_CALCULATION_FLAGS --target=pretheme
|
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user