Skip to content

Commit 91e808e

Browse files
author
uid10804
committed
ci(travis): update publish scripts to fix detached head issue
1 parent 06935f7 commit 91e808e

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ jspm_packages
1212
**/package.json.lerna_backup
1313
**/**/appconfig.json
1414
**/**/serverlessconfig.json
15-
**/.DS_Store
15+
**/.DS_Store
16+
.npmrc

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ jobs:
2828
- npm run test
2929
- npx snyk test
3030
- stage: release
31+
if: branch = feat/add-cli
3132
before_script:
3233
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null
3334
script:
3435
- make fake-credentials
36+
- git checkout feat/add-cli
3537
- make publish

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@ download:
1717

1818
.PHONY: publish-manually
1919
publish-manually:
20+
ifndef GH_TOKEN
21+
$(error GH_TOKEN is undefined)
22+
endif
2023
make install
2124
npx lerna version --include-merged-tags --force-publish --conventional-commits --create-release github
2225
npx lerna publish from-git --yes
2326

2427
.PHONY: publish
2528
publish:
29+
ifndef GH_TOKEN
30+
$(error GH_TOKEN is undefined)
31+
endif
2632
make install
27-
npx lerna version patch --include-merged-tags --force-publish --conventional-commits --create-release github --yes
33+
npx lerna version patch -m "chore(release): Travis CI update [ci skip]" --include-merged-tags --force-publish --conventional-commits --create-release github --yes
2834
npx lerna publish from-git --yes
2935

3036
.PHONY: start-test

0 commit comments

Comments
 (0)