Skip to content

Commit cb46944

Browse files
committed
Whoops was looking at the wrong package.json
1 parent 8d71a00 commit cb46944

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ TAG_TEST="^refs/tags/v.+$"
44
if [[ $GITHUB_REF =~ $TAG_TEST ]]; then
55
OVERRIDE_VERSION=${GITHUB_REF/refs\/tags\/v/}
66
else
7-
OVERRIDE_VERSION=$(npm version | sed -n "s/. reactfire: '\(.*\)',/\1/p")-canary.$SHORT_SHA
7+
OVERRIDE_VERSION=$(node -e "console.log(require('./package.json').version)")-canary.$SHORT_SHA
88
fi;
99

1010
npm --no-git-tag-version --allow-same-version -f version $OVERRIDE_VERSION
11-
yarn build && mv $(npm pack . | tail -n 1) reactfire.tgz
11+
yarn build && mv $(npm pack . | tail -n 1) reactfire.tgz

publish.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
LATEST_TEST="^[^-]*$"
22
CANARY_TEST="-canary."
33

4-
NPM_VERSION=$(npm version | sed -n "s/. reactfire: '\(.*\)',/\1/p")
4+
NPM_VERSION=$(npm view ./reactfire-$GITHUB_RUN_ID/reactfire.tgz version)
55

66
if [[ $NPM_VERSION =~ $LATEST_TEST ]]; then
77
NPM_TAG=latest
88
elif [[ $NPM_VERSION =~ $CANARY_TEST ]]; then
99
NPM_TAG=canary
1010
else
11-
NPM_TAG=next
11+
# TODO once we hit 3.0.0 move this back to next
12+
NPM_TAG=latest
1213
fi;
1314

14-
npm publish ./reactfire-$GITHUB_RUN_ID/reactfire.tgz --tag $NPM_TAG
15+
echo "Publishing to NPM @$NPM_TAG"
16+
npm publish ./reactfire-$GITHUB_RUN_ID/reactfire.tgz --tag $NPM_TAG

0 commit comments

Comments
 (0)