Skip to content

Commit

Permalink
Update release process
Browse files Browse the repository at this point in the history
  • Loading branch information
alichtman committed Apr 22, 2020
1 parent 5681c98 commit 66b12bb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 14 deletions.
16 changes: 7 additions & 9 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Release Process

`deadbolt` is distributed in three ways. Two of these are managed in the `scripts/release.sh` script. `Homebrew` is managed manually.
`deadbolt` is distributed in two ways.

1. GitHub Releases
2. Homebrew

## TL;DR

`$ ./scripts/release.sh` and then do the Homebrew stuff.
`$ ./scripts/release.sh` and then update the URLs in the [Homebrew taps repo](https://www.github.com/alichtman/homebrew-taps).

## Create macOS App

Expand All @@ -14,17 +17,12 @@ $ npm run preelectron-pack && npm run dist

The macOS installer can be found at `dist/deadbolt-x.y.z-mac.zip`.

## Publish on `npm`

```bash
$ npm version [major / minor / patch]
$ npm publish
```

## Release on GitHub

1. Bump the version number in `package.json`.
2. Commit and push.
3. `$ ./scripts/github-release.sh`

## Release on Homebrew

1. Update URLs in [Homebrew taps repo](https://github.com/alichtman/homebrew-taps/blob/master/deadbolt.rb)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deadbolt",
"version": "2.0.0",
"version": "0.0.0",
"description": "An open source encryption app that even your mom can use.",
"license": "MIT",
"author": "Aaron Lichtman <aaronlichtman@gmail.com>",
Expand Down
18 changes: 14 additions & 4 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# deadbolt release process

set -e

echo "Version increment?"
echo " 1) Major"
echo " 2) Minor"
Expand All @@ -16,16 +18,24 @@ case $n in
*) echo "Invalid option"; exit;;
esac

npm version "$bump"
version=$(node -p "require('./package.json').version")
echo "New version: ${version}"

npm version "$bump" -m "Version bump to v${version}"

read -p "New version: ${version} -- Continue (y/N)?" choice
case "$choice" in
y|Y ) echo "yes";;
n|N|* ) echo "Revert last commit!" && exit;;
esac

git push

# Build electron app for Linux, Windows and macOS

npm run preelectron-pack && npm run dist

# Push new release to GitHub

version=$(node -p "require('./package.json').version")
# Push new releases to GitHub
hub release create -a "dist/Deadbolt-${version}-mac.zip" -a "dist/Deadbolt ${version}.exe" -a "dist/deadbolt_${version}_amd64.deb" -m "deadbolt v${version}" "${version}"

# Homebrew
Expand Down

0 comments on commit 66b12bb

Please sign in to comment.