File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Validate that version number is same across all expected files
3+
4+ set -exuo pipefail
5+
6+ version=" ${1%% +* } "
7+ tag=" ${2} "
8+
9+ cd lib
10+ file=src/version.ts
11+ if ! sed " s/export const version = \'[^']\{1,\}\';\$ /export const version = \'${version} \';/" " ${file} " > " ${file} .tmp" ; then
12+ echo " Failed to insert version [${version} ] into file [$file ]"
13+ exit 1
14+ fi
15+ mv " ${file} .tmp" " ${file} "
16+
17+ npm version --no-git-tag-version --allow-same-version " $version "
18+ npm publish --access public --tag " $tag "
19+
20+ # Wait for npm publish to go through...
21+ sleep 5
22+
23+ cd " ../cli"
24+ npm version --no-git-tag-version --allow-same-version " $version "
25+ npm uninstall " @opentdf/sdk"
26+ npm install " @opentdf/sdk@$version "
27+ npm publish --access public --tag " $tag "
28+
29+ if [[ " $GITHUB_STEP_SUMMARY " ]]; then
30+ echo " ### Published ${version} (${tag} )" >> " $GITHUB_STEP_SUMMARY "
31+ fi
You can’t perform that action at this time.
0 commit comments