Skip to content

Commit

Permalink
Fix broken dev env
Browse files Browse the repository at this point in the history
  • Loading branch information
alichtman committed Mar 19, 2020
1 parent 2cc21f3 commit 9ebc509
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ yarn-debug.log*
yarn-error.log*
dist
build
/package-lock.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Download the latest release from the [deadbolt GitHub Releases](https://github.c
### Homebrew Install

```bash
$ brew cask install deadbolt
$ brew install alichtman/taps/deadbolt
```

### npm Install
Expand Down
26 changes: 24 additions & 2 deletions docs/release.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
# Release Process

**UNTESTED**

## Create macOS App

```bash
$ npm run preelectron-pack && npm run dist
```

### Making a New Release
The macOS installer can be found at `dist/deadbolt-0.1.0-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. $ hub release create -m "MESSAGE" `cat VERSION`

```bash
version=$(npm version | rg deadbolt | cut -d ":" -f 2 | sed s/\'//g | sed s/,//g | sed s/\ //g)
hub release create -m "deadbolt v$version" $version
```

## Release on Homebrew



2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"react-scripts": "^3.3.1"
},
"scripts": {
"start": "npm install && electron ./app",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
Expand Down
3 changes: 1 addition & 2 deletions public/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,14 @@ function decryptFile(filePath, decryptionKey) {
return "QUICKLOCK_ENCRYPTION_FAILURE";
}

// BUG: Incorrectly decrypted file still created.
console.log(`Decrypted file will be at: ${decryptedFilePath}`);
let write = fs.createWriteStream(decryptedFilePath);

const encryptedFile = fs.createReadStream(filePath, {
start: METADATA_LEN
});
encryptedFile.pipe(decrypt).pipe(write);

return decryptedFilePath;
});

return decryptedFilePath;
Expand Down

0 comments on commit 9ebc509

Please sign in to comment.