forked from quantified-uncertainty/squiggle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·38 lines (31 loc) · 958 Bytes
/
release.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
# This script is incomplete / work-in-progress.
set -e
if [ -z "$VERSION" ]; then
echo "VERSION must be set!"
exit 1
fi
publish_npm () {
local opts=""
if [ -n "$ALPHA" ]; then
opts="--tag alpha"
fi
for d in packages/squiggle-lang packages/components; do
# You need npm auth token to be set up, e.g. through `npm login`.
# TODO: bump components -> squiggle-lang dependency!
cd $d && yarn publish --non-interactive --no-git-tag-version --new-version "$VERSION" $opts && cd -
done
}
publish_vsce () {
local opts=""
if [ -n "$ALPHA" ]; then
opts="--pre-release"
fi
cd packages/vscode-ext
yarn version --no-git-tag-version --new-version "$VERSION"
# You need personal access token for this, see https://code.visualstudio.com/api/working-with-extensions/publishing-extension#create-a-publisher
vsce publish $opts
cd -
}
publish_npm
publish_vsce