-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·35 lines (26 loc) · 917 Bytes
/
release.sh
File metadata and controls
executable file
·35 lines (26 loc) · 917 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
35
#!/usr/bin/env bash
set -e
args=("$@")
VERSION=${args[0]}
[ -z "$VERSION" ] && echo "Version not provided" && exit 1
echo "Update version on relevant files"
sed -i "s/\"version\":.*/\"version\": \"$VERSION\",/" package.json
sed -i "s/version.'BIRL .*/version('BIRL $VERSION')/" index.js
echo "Manually update CHANGELOG"
read -sn 1 -p "Press any key to continue..." && echo ""
nvim CHANGELOG.md
echo "Adding files to the release commit"
read -sn 1 -p "Press any key to continue..." && echo ""
git add -p
echo "Commiting version change"
git commit -m "UAAAAAAHHH SAIU DA JAULA A VERSÃO $VERSION, BIRL!!!"
echo "Tagging last commit with version"
read -sn 1 -p "Press any key to continue..." && echo ""
git tag "$VERSION"
echo "Upload git changes to remote"
git push
git push --tags
echo "Publishing package"
read -sn 1 -p "Press any key to continue..." && echo ""
npm publish
echo "Version $VERSION published"