diff --git a/.gitignore b/.gitignore index 1377554..abd1d09 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ *.swp + +# This is where the releases go +releases diff --git a/README.md b/README.md index 85e6b75..c2ae17a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # tab-shortcuts Chrome extension that adds keyboard shortcuts for moving around tabs. -## Features +## Features This extension supports adding keybindings for the following actions: * `move-tabs-left`: Moves all selected tabs one position to the left. @@ -39,6 +39,19 @@ For consideration: * Keep track of tab position before move and allow for undo motion. +## Developing + +The source code is in the `tab-shortcuts` subdirectory, including the manifest +and javascript files. To make a release, run `bash make-release.sh` in the +top-level directory. This will put a new zip file into a `releases` +subdirectory, including the version extracted from the manifest. + +To update the version number, edit the `version` field in `manifest.json`. +This is required before uploading a new version to the Chrome Web Store. + +Note that `make-release.sh` requires that the `jq` command be installed (which +is used for parsing the JSON-based manifest file). + ## Acknowledgements Thanks to Kenneth LU for making the diff --git a/make-release.sh b/make-release.sh new file mode 100755 index 0000000..487ca15 --- /dev/null +++ b/make-release.sh @@ -0,0 +1,14 @@ +#!/usr/bin/bash + +VERSION=v`cat tab-shortcuts/manifest.json | jq -r '.version'` +RELEASE_FILENAME="tab-shortcuts-${VERSION}.zip" +RELEASE_PATH="releases/${RELEASE_FILENAME}" + +mkdir -p releases +if [ -e ${RELEASE_PATH} ]; then + rm ${RELEASE_PATH} +fi +cd tab-shortcuts +zip ../${RELEASE_PATH} * + +echo "Created ${RELEASE_PATH}"