Skip to content

Commit

Permalink
Release v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dguo committed Aug 9, 2017
1 parent a39b798 commit 0860632
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
*.swo
*.swp
*.zip
node_modules
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [0.2.0] - 2017-08-09
### Added
- A [landing page] to explain PawBlock
- A changelog
Expand All @@ -27,5 +29,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Added
- Initial implementation

[Unreleased]: https://github.com/dguo/pawblock/compare/v0.1.0...HEAD
[Unreleased]: https://github.com/dguo/pawblock/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/dguo/pawblock/compare/v0.1.0...v0.2.0
[landing page]: https://dannyguo.com/pawblock
2 changes: 1 addition & 1 deletion chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "PawBlock",
"version": "0.1.0",
"version": "0.2.0",
"description": "Block websites to prevent procrastination and execessive web surfing.",

"icons": {
Expand Down
4 changes: 3 additions & 1 deletion chrome/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ function restoreSettings() {

if (!items.schemaVersion) {
// Store the schema version to make future schema changes easier.
chrome.storage.sync.set({schemaVersion: '0.1.0'});
chrome.storage.sync.set({
schemaVersion: chrome.runtime.getManifest().version
});
}
}
});
Expand Down
17 changes: 17 additions & 0 deletions dev
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import argparse
import os
from subprocess import call
import sys
import zipfile

parser = argparse.ArgumentParser(prog='./dev')
subparsers = parser.add_subparsers(metavar='<command>', title='commands')
Expand Down Expand Up @@ -35,6 +36,22 @@ def lint(args, remaining):
parser_lint = subparsers.add_parser('lint', help='Lint the code with ESLint')
parser_lint.set_defaults(func=lint)

def release(args, remaining):
if raw_input('Did you update the manifest version [y/n]? ').lower() != 'y':
exit(1)
if raw_input('Did you update the changelog [y/n]? ').lower() != 'y':
exit(1)
with zipfile.ZipFile('pawblock-chrome.zip', 'w',
zipfile.ZIP_DEFLATED) as handle:
os.chdir('chrome')
for root, dirs, files in os.walk('.'):
for file in files:
handle.write(os.path.join(root, file))
print('Upload the new zip file in the Chrome Web Store developer dashboard')
print('https://chrome.google.com/webstore/developer/edit/jngmmiaolbliepfphdnelgfcclpnkoja')
parser_release = subparsers.add_parser('release', help='Help release an update')
parser_release.set_defaults(func=release)

if len(sys.argv) > 1:
args, remaining = parser.parse_known_args()
args.func(args, remaining)
Expand Down

0 comments on commit 0860632

Please # to comment.