blob: 416dcdca6d251ebe4c7639b63b6c93ac7b5bdf65 [file] [log] [blame]
#!/bin/bash
#make sure deps are up to date
rm -r node_modules
npm install
# get current version
VERSION=$(node --eval "console.log(require('./package.json').version);")
# Build
git checkout -b build
# Publish npm release with tests/scripts/goodies
# `npm run build` is run as a prepublish step
npm publish
# Create git tag, which is also the Bower/Github release
git add dist -f
git add bower.json component.json package.json
git rm -r bin docs scripts tests
git commit -m "build $VERSION"
# Tag and push
git tag $VERSION
git push --tags git@github.com:pouchdb/pouchdb.git $VERSION
# Cleanup
git checkout master
git branch -D build