-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathpublish.sh
More file actions
34 lines (20 loc) · 704 Bytes
/
publish.sh
File metadata and controls
34 lines (20 loc) · 704 Bytes
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
#!/bin/bash
# npm update
VERSION=$(node --eval "console.log(require('./package.json').version);")
echo "Ready to publish leaflet.migration version $VERSION."
echo "Has the version number been bumped?"
read -n1 -r -p "Press Ctrl+C to cancel, or any other key to continue." key
git checkout -b build
export NODE_ENV=release
npm run-script build
echo "Creating git tag v$VERSION..."
git add dist -f
git commit -m "v$VERSION"
git tag v$VERSION -f
git push --tags -f
echo "Uploading to NPM..."
npm publish
git checkout master
git branch -D build
echo "All done."
echo "Remember to run 'npm run-script integrity' and then commit the changes to the master branch, in order to update the website."