File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed
Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 44 "scripts" : {
55 "dev" : " yarn workspace @corelle/demo-app run dev" ,
66 "build" : " yarn workspaces foreach -A -p run build" ,
7- "publish" : " . /publish.sh "
7+ "publish" : " scripts /publish"
88 },
99 "author" : " Daven Quinn" ,
1010 "workspaces" : [
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash -e
22
3- # # Ensure work tree is clean
3+ # Ensure work tree is clean
44if ! git diff --quiet; then
55 echo " Working tree is not clean. Please commit all changes before publishing."
66 exit 1
@@ -19,8 +19,4 @@ read -p "Are you sure you want to publish? (y/n) " -n 1 -r
1919
2020yarn workspaces foreach --no-private -A npm publish --access public
2121
22- # Tag the release(s)
23- yarn workspaces foreach --no-private -A exec -- \
24- node -p ' const pkg = require("./package.json"); pkg.name + "-v" + pkg.version' \
25- | xargs git tag || true
26-
22+ yarn workspaces foreach --no-private -A exec -- $( pwd) /scripts/tag-release
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ version=$( node -p " require('./package.json').version" )
4+ name=$( node -p " require('./package.json').name" )
5+
6+ tag=$name -v$version
7+
8+ git tag -a " $name -v$version " -m " npm package $name version $version "
9+ if [ $? -eq 0 ]; then
10+ echo " Tagged $tag "
11+ else
12+ echo " Tag $tag already exists"
13+ exit 0
14+ fi
You can’t perform that action at this time.
0 commit comments