Skip to content

Commit 1797f8f

Browse files
committed
Updated publish script
1 parent f01ca2a commit 1797f8f

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"description": "A workspace for managing the Corelle project.",
3+
"private": true,
34
"scripts": {
45
"dev": "yarn workspace @corelle/demo-app run dev",
56
"build": "yarn workspaces foreach -A -p run build",

frontend/packages/demo-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "2.0.0",
44
"description": "A demo frontend for the Corelle plate-rotation application. Runs at rotate.macrostrat.org",
55
"main": "index.html",
6+
"private": true,
67
"type": "module",
78
"scripts": {
89
"dev": "vite ."

frontend/publish.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash -e
22

3-
# Ensure work tree is clean
3+
## Ensure work tree is clean
44
if ! git diff --quiet; then
55
echo "Working tree is not clean. Please commit all changes before publishing."
66
exit 1
@@ -12,9 +12,15 @@ yarn workspaces foreach --no-private -A run build
1212

1313
echo "Listing files to be published:"
1414

15-
yarn workspaces foreach --no-private -A run pack --dry-run
15+
yarn workspaces foreach --no-private -A pack --dry-run
1616

1717
# Prompt user to confirm publishing
1818
read -p "Are you sure you want to publish? (y/n) " -n 1 -r
1919

2020
yarn workspaces foreach --no-private -A npm publish --access public
21+
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+

0 commit comments

Comments
 (0)