]> git.proxmox.com Git - mirror_xterm.js.git/blame - bin/prepare-release
fix tests
[mirror_xterm.js.git] / bin / prepare-release
CommitLineData
7fdfc622
PK
1#! /usr/bin/env sh
2
3# Usage: ./bin/prepare-release x.y.z
4# x.y.z should be semver (e.g. 1.0.0)
5
d581559d
PK
6set -e
7
7fdfc622
PK
8NEW_VERSION=$1
9CURRENT_PACKAGE_JSON_VERSION=$(cat package.json \
10 | grep version \
11 | head -1 \
12 | awk -F: '{ print $2 }' \
13 | sed 's/[",]//g' \
14 | tr -d '[[:space:]]')
15CURRENT_BOWER_JSON_VERSION=$(cat bower.json \
16 | grep version \
17 | head -1 \
18 | awk -F: '{ print $2 }' \
19 | sed 's/[",]//g' \
20 | tr -d '[[:space:]]')
21
ed1a31d1
PK
22# Build xterm.js into `dist`
23export BUILD_DIR=dist
081fe3f3 24npm run build
7fdfc622
PK
25
26# Update AUTHORS file
27sh bin/generate-authors
28
ed1a31d1
PK
29# Update version in package.json and bower.json
30sed -i "s/\"version\": \"$CURRENT_PACKAGE_JSON_VERSION\"/\"version\": \"$NEW_VERSION\"/g" package.json
31sed -i "s/\"version\": \"$CURRENT_BOWER_JSON_VERSION\"/\"version\": \"$NEW_VERSION\"/g" bower.json
32
5ddf6301 33git commit -S -s -a -m "Bump version to $NEW_VERSION"
05aff199 34git tag $NEW_VERSION