Skip to content

Commit

Permalink
[build] revert removal of DO_PUBLISH env var
Browse files Browse the repository at this point in the history
  • Loading branch information
akosyakov committed Apr 15, 2021
1 parent ea1fa16 commit d0ac11a
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions WORKSPACE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ defaultTarget: components:all
defaultArgs:
coreYarnLockBase: ../..
npmPublishTrigger: "false"
publishToNPM: true

defaultVariant:
config:
Expand Down
2 changes: 2 additions & 0 deletions components/gitpod-protocol/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ packages:
- ["sh", "-c", "mv scripts/* ."]
- name: publish
type: generic
env:
- DO_PUBLISH=${publishToNPM}
argdeps:
- npmPublishTrigger
deps:
Expand Down
5 changes: 5 additions & 0 deletions components/gitpod-protocol/scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ const qualifier = process.argv[2];
const rootDir = process.cwd();
const pckDir = path.join(rootDir, process.argv[3]);

if (process.env.DO_PUBLISH === "false") {
console.warn('Skipping publishing per request.');
process.exit(0);
}

if (process.env.NPM_AUTH_TOKEN) {
fs.writeFileSync(path.join(pckDir, '.npmrc'), `//registry.npmjs.org/:_authToken=${process.env.NPM_AUTH_TOKEN}\n`, 'utf-8');
} else {
Expand Down
2 changes: 2 additions & 0 deletions components/supervisor-api/typescript-grpc/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ packages:
tsconfig: tsconfig.json
- name: publish
type: generic
env:
- DO_PUBLISH=${publishToNPM}
argdeps:
- npmPublishTrigger
deps:
Expand Down
2 changes: 2 additions & 0 deletions components/supervisor-api/typescript-grpcweb/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ packages:
tsconfig: tsconfig.json
- name: publish
type: generic
env:
- DO_PUBLISH=${publishToNPM}
argdeps:
- npmPublishTrigger
deps:
Expand Down
2 changes: 2 additions & 0 deletions components/supervisor-api/typescript-rest/BUILD.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ packages:
tsconfig: tsconfig.json
- name: publish
type: generic
env:
- DO_PUBLISH=${publishToNPM}
argdeps:
- npmPublishTrigger
deps:
Expand Down

0 comments on commit d0ac11a

Please sign in to comment.