-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): separate version from build (#3447)
and cleared that thing and rotated it too
- Loading branch information
Showing
5 changed files
with
61 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { execa } from 'execa'; | ||
|
||
async function run() { | ||
const { stdout: branchName } = await execa('git', [ | ||
'rev-parse', | ||
'--abbrev-ref', | ||
'HEAD', | ||
]); | ||
|
||
// using the environment variable NPM_TOKEN, create a .npmrc file | ||
// and set the token to the value of the environment variable | ||
// Publishing each package, if on master/main branch publish beta versions | ||
// otherwise publish latest | ||
if (branchName === 'release') { | ||
await execa('npx', [ | ||
'lerna', | ||
'publish', | ||
'from-package', | ||
'--no-verify-access', | ||
'--yes', | ||
]); | ||
} else { | ||
await execa('npx', [ | ||
'lerna', | ||
'publish', | ||
'from-package', | ||
'--no-verify-access', | ||
'--yes', | ||
'--dist-tag', | ||
'beta', | ||
]); | ||
} | ||
|
||
console.log('Finished'); | ||
} | ||
|
||
run().catch(err => { | ||
console.error('Error encountered during package publish:', err); | ||
process.exit(1); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters