Skip to content

Commit e53f834

Browse files
committed
Merge pull request #708 from cozy/test_publish
Fix publish script
2 parents 38d4e17 + 4a32964 commit e53f834

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

.travis.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,36 @@ deploy:
4040
- provider: script
4141
repo: cozy/cozy-collect
4242
skip-cleanup: true
43-
script: DEPLOY_BRANCH=build && yarn deploy && yarn cozyPublish
43+
script: export DEPLOY_BRANCH=build && yarn deploy && yarn cozyPublish
4444
on:
4545
branch: master
46-
# We need to fetch the build branch since Travis only clone the job related branch and we don't push new builds on tags
4746
- provider: script
4847
repo: cozy/cozy-collect
4948
skip-cleanup: true
50-
script: DEPLOY_BRANCH=latest && git fetch origin "$DEPLOY_BRANCH:$DEPLOY_BRANCH" && yarn cozyPublish
49+
script: export DEPLOY_BRANCH=latest && yarn cozyPublish
5150
on:
5251
tags: true
5352
- provider: script
5453
repo: cozy/cozy-collect
5554
skip-cleanup: true
56-
script: DEPLOY_BRANCH=latest && yarn deploy
55+
script: export DEPLOY_BRANCH=latest && yarn cozyPublish
56+
on:
57+
branch: test_publish
58+
- provider: script
59+
repo: cozy/cozy-collect
60+
skip-cleanup: true
61+
script: export DEPLOY_BRANCH=latest && yarn deploy
5762
on:
5863
branch: prod
5964
- provider: script
6065
repo: cozy/cozy-collect
6166
skip-cleanup: true
62-
script: DEPLOY_BRANCH=build_no_more_providers && yarn deploy
67+
script: export DEPLOY_BRANCH=build_no_more_providers && yarn deploy
6368
on:
6469
branch: feature/no-more-providers
6570
- provider: script
6671
repo: cozy/cozy-collect
6772
skip-cleanup: true
68-
script: DEPLOY_BRANCH=build_orange && yarn deploy
73+
script: export DEPLOY_BRANCH=build_orange && yarn deploy
6974
on:
7075
branch: orange

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"commons:watch": "cozy-scripts watch",
1313
"commons:watch:standalone": "cozy-scripts standalone",
1414
"deploy": "git-directory-deploy --directory build/ --branch ${DEPLOY_BRANCH:-build} --repo=${DEPLOY_REPOSITORY:-https://[email protected]/cozy/cozy-collect.git}",
15-
"cozyPublish": "cozy-app-publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})",
15+
"cozyPublish": "git fetch origin ${DEPLOY_BRANCH:-build}:${DEPLOY_BRANCH:-build} && cozy-app-publish --token $REGISTRY_TOKEN --build-commit $(git rev-parse ${DEPLOY_BRANCH:-build})",
1616
"tx": "tx pull --all || true",
1717
"precommons:build": "npm-run-all lint tx",
1818
"prebuild:browser": "npm run clean:browser",

0 commit comments

Comments
 (0)