forked from github-tools/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·39 lines (31 loc) · 764 Bytes
/
release.sh
File metadata and controls
executable file
·39 lines (31 loc) · 764 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
36
37
38
39
#!/bin/bash
# This is the automated release script
# guard against stupid
if [ -z "$1" ]; then
echo "You must specify a new version level: [patch, minor, major]";
exit 1;
fi
# make sure all our dependencies are installed so we can publish docs
npm install
# try to build to make sure we don't publish something really broken
npm run build
# bump the version
echo "npm version $1"
npm version $1
git push
git push --tags
# start from a clean state
rm -rf docs/ out/
mkdir out
# build the docs
npm run make-docs
VERSION=`ls docs/github-api`
# switch to gh-pages and add the docs
mv docs/github-api/* out/
rm -rf docs/
git checkout gh-pages
mv out/* docs/
echo $VERSION >> _data/versions.csv
git add .
git commit -m "adding docs for v$VERSION"
git push