Skip to content

Commit f861d6c

Browse files
committed
(#40) Added pre-release scripts
1 parent 2f99bf2 commit f861d6c

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.build/pre-release.ps1

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
"//registry.npmjs.org/:_authToken=$env:NPM_TOKEN`n" | out-file "$env:userprofile\.npmrc" -Encoding ASCII
2+
npm whoami
3+
4+
$timestamp = Get-Date -Format yyyyMMddhhmmss
5+
$patchVersion = (npm --no-git-tag version patch)
6+
$nextVersion = "${patchVersion}-next.${timestamp}".Substring(1)
7+
echo $nextVersion
8+
9+
npm version --no-git-tag -f $nextVersion
10+
npm run publish:next

.build/pre-release.sh

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#!/usr/bin/env bash
22
set -ex
33

4+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
5+
npm whoami
6+
47
patchVersion=$(npm --no-git-tag version patch)
58
nextVersion=${patchVersion}-next."$(date +%Y%m%d%H%M%S)"
69
echo "${nextVersion:1}"

0 commit comments

Comments
 (0)