diff --git a/README.md b/README.md index de16efa..f219933 100644 --- a/README.md +++ b/README.md @@ -13,13 +13,16 @@ __Features:__ - Spent time is stored as metadata using [git-notes](https://git-scm.com/docs/git-notes) and pushed automatically -__Currently Supported: (see roadmap)__ +__Currently Supported:__ -- Platforms: __OSX__ +- Platforms: __OSX, Linux and Windows__ - Version Control: __Git__ ## Getting Started -1. Download the [latest release](https://github.com/timeglass/glass/releases/latest) for your platform and unzip the contents into a directory that is in your systems PATH (e.g /usr/local/bin). +1. Download the [latest release](https://github.com/timeglass/glass/releases/latest) for your platform and unzip the contents into a directory that is in your systems PATH (e.g /usr/local/bin). + + _Note 1: We currently only support 64-bit prebuild binaries, for other architectures please build from source (see below)._ + _Note 2: For Windows, the documentation assumes you're using Git through a [bash-like CLI](https://msysgit.github.io/) but nothing about the implementation prevents you from using another approach._ 2. Use your terminal to navigate to the repository that contains the project you would like to track and install the hooks: @@ -73,7 +76,6 @@ The source code will now be in your workspace and binaries are found in `$GOPATH ## Roadmap, input welcome! - __Supporting Other VCS:__ Timeglass currently only works for git repositories, mainly due to the number of hooks it provides. _What other version control systems would you like to see implemented? Input welcome [here](https://github.com/Timeglass/glass/issues/10)_ -- __Supporting other OSs:__ File monitoring is implemented differently across platforms. The current implementation uses FSEvents (OSX), let me know what other platforms you would like to see implemented [here](https://github.com/Timeglass/glass/issues/11) ## Known Issues diff --git a/VERSION b/VERSION index 4b9fcbe..cb0c939 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.1 +0.5.2 diff --git a/docs/config.md b/docs/config.md index 4e88e69..3f26580 100644 --- a/docs/config.md +++ b/docs/config.md @@ -10,7 +10,6 @@ Timeglass can be configured by creating a `timeglass.json` file in the root of t ``` Are you interested in configuring anything else? [let us know](https://github.com/Timeglass/glass/issues/7) - ## MBU __key__: `mbu` @@ -31,9 +30,8 @@ will output commit messages like this: ```I did something [spent 0.1 hours]``` - ## Automatically Push Time data __key__: `auto_push` __requirements__: git v1.8.2.1 or higher -Timeglass uses [git-notes](http://git-scm.com/docs/git-notes) for storing commit times, since git-notes uses a seperate branch for such data it needs to be explicitely pushed or else data is merely stored local and lost whenever the clone is removed. To prevent this, Timeglass installes a pre-push hook that automatically pushes time data to the same remote as the push itself. If you rather want full control over when to push time data using the `glass push` command, you can disable the automatic behaviour with this options: `"auto_push": false`. The pre-push hook was introduced in git v1.8.2, if you're running an older version the hook is simply not run and this option does nothing. \ No newline at end of file +Timeglass uses [git-notes](http://git-scm.com/docs/git-notes) for storing commit times. git-notes uses a seperate branch for this data that needs to be explicitely pushed or else data is merely stored local and lost whenever the clone is removed. To prevent this, Timeglass installes a pre-push hook that automatically pushes time data to the same remote as the push itself. If you rather want full control over when to push time data using the `glass push` command, you can disable the automatic behaviour with this options: `"auto_push": false`. The pre-push hook was introduced in git v1.8.2, if you're running an older version the hook is simply not run and this option does nothing. \ No newline at end of file diff --git a/docs/query.md b/docs/query.md index a6e489b..767a502 100644 --- a/docs/query.md +++ b/docs/query.md @@ -8,13 +8,13 @@ Because querying Git can be a science in it own right we included some common pa ## How much time was spent on... -##### ...on all commits since "yesterday"? +##### ...all commits since "yesterday"? git log --since="1 days ago" --pretty=%H | glass sum -##### ...on all commits authored by "advanderveer" since "this morning"? +##### ...all commits authored by "advanderveer" since "this morning"? git log --author=advanderveer --since="9am" --pretty=%H | glass sum -##### ...on all commits since "May 20"? +##### ...all commits since "May 20"? git log --since="may 20" --pretty=%H | glass sum ##### ...all commits up up to and including the current HEAD? @@ -29,7 +29,7 @@ Because querying Git can be a science in it own right we included some common pa ##### ...commits in the current branch (given the current branch is not master)? git rev-list master..HEAD | glass sum -##### ...on commits of the branch that were merged in commit "d2192a058" +##### ...commits of the branch that were merged in commit "d2192a058" git rev-list d2192a058^..d2192a058 | glass sum NOTE: To show all merges that occured: `git log --merges --format=oneline` diff --git a/docs/uninstall.md b/docs/uninstall.md index 90edcb8..603d2c1 100644 --- a/docs/uninstall.md +++ b/docs/uninstall.md @@ -6,10 +6,11 @@ That being said, you can do the following in order to remove Timeglass from a si 1. Stop the timer by running `glass stop`. If its not running thats OK, you can skip this step. 2. Remove the git hooks timeglass creates from the `.git/hooks` directory of your repo. The following files are created during installation: - .git/hooks/post-checkout + - .git/hooks/prepare-commit-msg - .git/hooks/post-commit - .git/hooks/pre-push -If you would like to continue and remove Timeglass entirely from your system you can continue with the following: +If you would like to continue and remove Timeglass from your system entirely, you can continue with the following: 1. Remove the metadata directory: `~/.timeglass` 2. Remove the binaries itself from were you installed, they're named `glass` and `glass-daemon`. diff --git a/glass-daemon/timer.go b/glass-daemon/timer.go index a8f0af3..418d8b1 100644 --- a/glass-daemon/timer.go +++ b/glass-daemon/timer.go @@ -99,6 +99,8 @@ func (t *Timer) Start() { //previous tick was the last mbu, don't //increment this mbu + t.Lock() + defer t.Unlock() if !t.ticking { return } diff --git a/make.bash b/make.bash index f69492e..285f058 100755 --- a/make.bash +++ b/make.bash @@ -89,6 +89,7 @@ case $1 in --tag v`cat VERSION` \ --pre-release ;; + # 5. upload files "publish-5" ) for FOLDER in ./bin/*_* ; do \