+++ /dev/null
-# Checklist of things to do when creating a lib
-
-## Copying the project
-
-- `cp -r lib-boilerplate-ts my-new-lib` (careful copying `node_modules`)
-- `rm -rf .git`
-- `rm .checklist.md`
-- `git init .`
-- `git add .`
-- `git commit -m 'init'`
-- `sed -i '' 's/lib-boilerplate-ts/vue-local-scope/g' README.md package.json`
-
-## circle ci
-
-- Add the project: https://circleci.com/projects/gh/posva
-- Check _Build on forked pull requests_: https://circleci.com/gh/posva/vue-tweezing/edit#advanced-settings
-- Check _Auto cancel redundant build_ (same place)
-
-## Greenkeeper
-
-- Activate it: https://github.com/settings/installations/5583
-- Merge its first pull request
-
-## Beerpay
-
-- Add project: https://beerpay.io/dashboard/projects/add
-
-## Github Settings
-
-- Activate probot/settings: https://github.com/settings/installations/85597
+++ /dev/null
-{
- "src": {
- "tagName": "v%s",
- "commitMessage": "chore(release): %s"
- },
- "github": {
- "release": true,
- "releaseName": "🚀 Release %s",
- "tokenRef": "GITHUB_TOKEN"
- },
- "npm": {
- "publish": true
- },
- "changelogCommand": "git log --pretty=\"format:'* %s (%h)'\" [REV_RANGE] | grep -vE '(chore|test|refactor|docs)'"
-}
--- /dev/null
+set -e
+echo "Current version:" $(grep version package.json | sed -E 's/^.*"(4[^"]+)".*$/\1/')
+echo "Enter alpha version e.g., 2 will generate 2.0.0-alpha.2: "
+read ALPHA
+
+VERSION="2.0.0-alpha.$ALPHA"
+
+read -p "Releasing v$VERSION - are you sure? (y/n)" -n 1 -r
+echo # (optional) move to a new line
+if [[ $REPLY =~ ^[Yy]$ ]]
+then
+ echo "Releasing v$VERSION ..."
+
+ # clear existing ts cache
+ rm -rf node_modules/.rts2_cache
+
+ # generate the version so that the changelog can be generated too
+ yarn version --no-git-tag-version --no-commit-hooks --new-version $VERSION
+
+ yarn run build
+ yarn run build:dts
+ yarn run test:dts
+
+ # changelog
+ yarn run changelog
+ yarn prettier --write CHANGELOG.md
+ echo "Please check the git history and the changelog and press enter"
+ read OKAY
+
+ # commit and tag
+ git add CHANGELOG.md package.json
+ git commit -m "release: v$VERSION"
+ git tag "v$VERSION"
+
+ # commit
+ yarn publish --tag next --new-version "$VERSION" --no-commit-hooks --no-git-tag-version
+
+ # publish
+ git push origin refs/tags/v$VERSION
+ git push
+fi