Skip to content

Commit

Permalink
Merge branch 'release/v1.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
kilpkonn committed Jan 18, 2021
2 parents 12094b4 + b2b7709 commit fbf089b
Show file tree
Hide file tree
Showing 36 changed files with 386 additions and 171 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/develop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
cd $GOPATH
- name: Build
run: |
go get -v -d github.com/kilpkonn/gtm-enhanced
cd $GOPATH/src/github.com/kilpkonn/gtm-enhanced
go get -v -d github.com/DEVELOPEST/gtm-core
cd $GOPATH/src/github.com/DEVELOPEST/gtm-core
mkdir build
go build --tags static -o build/ ./...
cd build/
mv gtm-enhanced gtm
mv gtm-core gtm
chmod +x gtm
cd $GOPATH
- uses: actions/upload-artifact@v2
Expand Down Expand Up @@ -87,16 +87,16 @@ jobs:
cd vendor/libgit2
new-item -Name "build" -ItemType directory
cd build
cmake -DUSE_SSH=OFF -DCMAKE_INSTALL_PREFIX=D:\a\gtm-enhanced\gtm-enhanced\src\github.com\libgit2\git2go\vendor\libgit2\install ..
cmake -DUSE_SSH=OFF -DCMAKE_INSTALL_PREFIX=D:\a\gtm-core\gtm-core\src\github.com\libgit2\git2go\vendor\libgit2\install ..
cmake --build . --target install
- name: Build
run: |
go get -v -d github.com/kilpkonn/gtm-enhanced
cd ./src/github.com/kilpkonn/gtm-enhanced
go get -v -d github.com/DEVELOPEST/gtm-core
cd ./src/github.com/DEVELOPEST/gtm-core
new-item -Name "build" -ItemType directory
$env:PKG_CONFIG_PATH += ";D:\a\gtm-enhanced\gtm-enhanced\src\github.com\libgit2\git2go\vendor\libgit2\install\lib\pkgconfig"
$env:PKG_CONFIG_PATH += ";D:\a\gtm-core\gtm-core\src\github.com\libgit2\git2go\vendor\libgit2\install\lib\pkgconfig"
go build -o build/ main.go
Copy-Item "D:/a/gtm-enhanced/gtm-enhanced/src/github.com/libgit2/git2go/vendor/libgit2/install/bin/git2.dll" -Destination "./build/git2.dll"
Copy-Item "D:/a/gtm-core/gtm-core/src/github.com/libgit2/git2go/vendor/libgit2/install/bin/git2.dll" -Destination "./build/git2.dll"
cd build
dir
Rename-Item -Path "main.exe" -NewName "gtm.exe"
Expand Down Expand Up @@ -138,12 +138,12 @@ jobs:
cd $GOPATH
- name: Build
run: |
go get -v -d github.com/kilpkonn/gtm-enhanced
cd $GOPATH/src/github.com/kilpkonn/gtm-enhanced
go get -v -d github.com/DEVELOPEST/gtm-core
cd $GOPATH/src/github.com/DEVELOPEST/gtm-core
mkdir build
go build --tags static -o build/ ./...
cd build/
mv gtm-enhanced gtm
mv gtm-core gtm
chmod +x gtm
cd $GOPATH
- uses: actions/upload-artifact@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
cmake ..
make
sudo make install
go get -v -d github.com/kilpkonn/gtm-enhanced
go get -v -d github.com/DEVELOPEST/gtm-core
- name: golangci-lint
uses: reviewdog/action-golangci-lint@v1
with:
Expand All @@ -45,4 +45,4 @@ jobs:
tool_name: Reviewdog
reporter: github-pr-check
golangci_lint_flags: "--config=.golangci.yml"
workdir: src/github.com/kilpkonn/gtm-enhanced
workdir: src/github.com/DEVELOPEST/gtm-core
46 changes: 23 additions & 23 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
env:
GOPATH: ${{ github.workspace }}
GO111MODULE: auto
APP_NAME: 'gtm-enhanced'
APP_NAME: 'gtm-core'
MAINTAINER: 'kilpkonn'
DESC: 'Seamless time tracking for git.'
steps:
Expand Down Expand Up @@ -45,12 +45,12 @@ jobs:
cd $GOPATH
- name: Build
run: |
go get -v -d github.com/kilpkonn/gtm-enhanced
cd $GOPATH/src/github.com/kilpkonn/gtm-enhanced
go get -v -d github.com/DEVELOPEST/gtm-core
cd $GOPATH/src/github.com/DEVELOPEST/gtm-core
mkdir build
go build --tags static -ldflags "-X main.Version=${{ github.event.inputs.release_version }}" -o build/ ./...
cd build/
mv gtm-enhanced gtm
mv gtm-core gtm
chmod +x gtm
cd $GOPATH
- uses: actions/upload-artifact@v2
Expand All @@ -59,14 +59,14 @@ jobs:
path: ./src/github.com/${{ github.repository }}/build/
- name: Verify version
run: |
v="$(${GOPATH}/src/github.com/kilpkonn/gtm-enhanced/build/gtm verify ${{ github.event.inputs.release_version }})"
v="$(${GOPATH}/src/github.com/DEVELOPEST/gtm-core/build/gtm verify ${{ github.event.inputs.release_version }})"
if [ ! "$v" == "true" ]; then
exit 1
fi
- name: Prepare deb package
run: |
mkdir -p .debpkg/usr/bin
cp $GOPATH/src/github.com/kilpkonn/gtm-enhanced/build/gtm .debpkg/usr/bin
cp $GOPATH/src/github.com/DEVELOPEST/gtm-core/build/gtm .debpkg/usr/bin
chmod +x .debpkg/usr/bin
- name: Build deb package
uses: jiro4989/build-deb-action@v2
Expand All @@ -80,7 +80,7 @@ jobs:
- name: Upload deb package
uses: actions/upload-artifact@v2
with:
name: gtm-debian
name: gtm-core-debian
path: |
./*.deb
build-windows:
Expand Down Expand Up @@ -115,16 +115,16 @@ jobs:
cd vendor/libgit2
new-item -Name "build" -ItemType directory
cd build
cmake -DUSE_SSH=OFF -DCMAKE_INSTALL_PREFIX=D:\a\gtm-enhanced\gtm-enhanced\src\github.com\libgit2\git2go\vendor\libgit2\install ..
cmake -DUSE_SSH=OFF -DCMAKE_INSTALL_PREFIX=D:\a\gtm-core\gtm-core\src\github.com\libgit2\git2go\vendor\libgit2\install ..
cmake --build . --target install
- name: Build
run: |
go get -v -d github.com/kilpkonn/gtm-enhanced
cd ./src/github.com/kilpkonn/gtm-enhanced
go get -v -d github.com/DEVELOPEST/gtm-core
cd ./src/github.com/DEVELOPEST/gtm-core
new-item -Name "build" -ItemType directory
$env:PKG_CONFIG_PATH += ";D:\a\gtm-enhanced\gtm-enhanced\src\github.com\libgit2\git2go\vendor\libgit2\install\lib\pkgconfig"
$env:PKG_CONFIG_PATH += ";D:\a\gtm-core\gtm-core\src\github.com\libgit2\git2go\vendor\libgit2\install\lib\pkgconfig"
go build -ldflags "-X main.Version=${{ github.event.inputs.release_version }}" -o build/ main.go
Copy-Item "D:/a/gtm-enhanced/gtm-enhanced/src/github.com/libgit2/git2go/vendor/libgit2/install/bin/git2.dll" -Destination "./build/git2.dll"
Copy-Item "D:/a/gtm-core/gtm-core/src/github.com/libgit2/git2go/vendor/libgit2/install/bin/git2.dll" -Destination "./build/git2.dll"
cd build
dir
Rename-Item -Path "main.exe" -NewName "gtm.exe"
Expand All @@ -134,7 +134,7 @@ jobs:
path: ./src/github.com/${{ github.repository }}/build/
- name: Verify version
run: |
$v = ./src/github.com/kilpkonn/gtm-enhanced/build/gtm.exe verify ${{ github.event.inputs.release_version }}
$v = ./src/github.com/DEVELOPEST/gtm-core/build/gtm.exe verify ${{ github.event.inputs.release_version }}
If ($v -eq "false") {
Exit 1
}
Expand All @@ -145,15 +145,15 @@ jobs:
run: |
cd msicreator
md staging
Copy-Item "D:/a/gtm-enhanced/gtm-enhanced/src/github.com/libgit2/git2go/vendor/libgit2/install/bin/git2.dll" -Destination "./staging/git2.dll"
Copy-Item "D:/a/gtm-enhanced/gtm-enhanced/src/github.com/kilpkonn/gtm-enhanced/build/gtm.exe" -Destination "./staging/gtm.exe"
Copy-Item "D:/a/gtm-enhanced/gtm-enhanced/src/github.com/kilpkonn/gtm-enhanced/deploy/windows/gtm.json" -Destination "./gtm.json"
Copy-Item "D:/a/gtm-enhanced/gtm-enhanced/src/github.com/kilpkonn/gtm-enhanced/deploy/windows/Licence.rtf" -Destination "./Licence.rtf"
Copy-Item "D:/a/gtm-core/gtm-core/src/github.com/libgit2/git2go/vendor/libgit2/install/bin/git2.dll" -Destination "./staging/git2.dll"
Copy-Item "D:/a/gtm-core/gtm-core/src/github.com/DEVELOPEST/gtm-core/build/gtm.exe" -Destination "./staging/gtm.exe"
Copy-Item "D:/a/gtm-core/gtm-core/src/github.com/DEVELOPEST/gtm-core/deploy/windows/gtm.json" -Destination "./gtm.json"
Copy-Item "D:/a/gtm-core/gtm-core/src/github.com/DEVELOPEST/gtm-core/deploy/windows/Licence.rtf" -Destination "./Licence.rtf"
(Get-Content ./gtm.json).replace('{VERSION}', '${{ github.event.inputs.release_version }}') | Set-Content ./gtm.json
py createmsi.py gtm.json
- uses: actions/upload-artifact@v2
with:
name: gtm-windows-installer
name: gtm-core-windows-installer
path: ./msicreator/*.msi
build-macOS:
runs-on: macos-latest
Expand Down Expand Up @@ -189,21 +189,21 @@ jobs:
cd $GOPATH
- name: Build
run: |
go get -v -d github.com/kilpkonn/gtm-enhanced
cd $GOPATH/src/github.com/kilpkonn/gtm-enhanced
go get -v -d github.com/DEVELOPEST/gtm-core
cd $GOPATH/src/github.com/DEVELOPEST/gtm-core
mkdir build
go build --tags static -ldflags "-X main.Version=${{ github.event.inputs.release_version }}" -o build/ ./...
cd build/
mv gtm-enhanced gtm
mv gtm-core gtm
chmod +x gtm
cd $GOPATH
- uses: actions/upload-artifact@v2
with:
name: gtm-macOS
name: gtm-core-macOS
path: ./src/github.com/${{ github.repository }}/build/
- name: Verify version
run: |
v="$(${GOPATH}/src/github.com/kilpkonn/gtm-enhanced/build/gtm verify ${{ github.event.inputs.release_version }})"
v="$(${GOPATH}/src/github.com/DEVELOPEST/gtm-core/build/gtm verify ${{ github.event.inputs.release_version }})"
if [ ! "$v" == "true" ]; then
exit 1
fi
75 changes: 34 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
**Based on https://github.com/git-time-metric/gtm**
<div align="center"><img src="https://cloud.githubusercontent.com/assets/630550/19619834/43c460dc-9835-11e6-8652-1c8fff91cf02.png" alt="GTM Logo" height="115" width="275"></div>
<div align="center"><font size=16><bold>Git Time Metric</bold></font></div>

<p align="center">
<img src="./readme/logo.svg" width="256" height="256" alt="logo">
</p>

### Seamless time tracking for all your Git projects
![Release](https://github.com/kilpkonn/gtm-enhanced/workflows/Release/badge.svg?branch=master)
![Develop](https://github.com/kilpkonn/gtm-enhanced/workflows/Develop/badge.svg?branch=develop)
![Release](https://github.com/DEVELOPEST/gtm-core/workflows/Release/badge.svg?branch=master)
![Develop](https://github.com/DEVELOPEST/gtm-core/workflows/Develop/badge.svg?branch=develop)

## Installation
See wiki: https://github.com/kilpkonn/gtm-enhanced/wiki/Installation
See wiki: https://github.com/DEVELOPEST/gtm-core/wiki/Installation

##### $ gtm report -last-month
<div><img src="https://cloud.githubusercontent.com/assets/630550/21582250/8a03f9dc-d015-11e6-8f77-548ef7314bf7.png"></div>
Expand All @@ -20,42 +22,32 @@ See wiki: https://github.com/kilpkonn/gtm-enhanced/wiki/Installation

GTM is automatic, seamless and lightweight. There is no need to remember to start and stop timers. It runs on occasion to capture activity triggered by your editor. The time metrics are stored locally with the git repository as [Git notes](https://git-scm.com/docs/git-notes) and can be pushed to the remote repository.

### <div align="center">Plugins</div>
### Plugins

Simply install a plugin for your favorite editor and the GTM command line utility to start tracking your time now.

<p><img src="https://cloud.githubusercontent.com/assets/630550/17458557/72247454-5bda-11e6-84ce-03364b8ac832.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458560/72397408-5bda-11e6-909c-c2dd2dad3b52.png" width="64" height="64">
<img src="https://user-images.githubusercontent.com/3669664/62366235-a39ef880-b526-11e9-9408-e549b5b12a46.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458562/7264e2be-5bda-11e6-8311-bbed672ffb8f.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458559/72302916-5bda-11e6-886e-2a41f423b06f.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458563/7264f06a-5bda-11e6-9fb6-d0469730c1cb.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458556/72030a62-5bda-11e6-89e4-6a3921034aed.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458564/727d43a4-5bda-11e6-8b3c-56d3fb7bf988.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458555/71e4352e-5bda-11e6-89d3-e8ff2c3a86e2.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458561/72417ac2-5bda-11e6-9769-04cffc64397e.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458591/82e06c98-5bdb-11e6-8ae0-c5b2bd2fe97f.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/17458558/72269342-5bda-11e6-8194-d9bf030bd037.png" width="64" height="64">
<img src="https://cloud.githubusercontent.com/assets/630550/19619987/f9f7523a-9838-11e6-99da-c3fda05ce0d6.png" width="64" height="64"></p>

### Initialize a project for time tracking

<pre>$ cd /my/project/dir
$ gtm init

Git Time Metric initialized for /my/project/dir

post-commit: gtm commit --yes
alias.fetchgtm: fetch origin refs/notes/gtm-data:refs/notes/gtm-data
alias.pushgtm: push origin refs/notes/gtm-data
notes.rewriteref: refs/notes/gtm-data
terminal: true
.gitignore: /.gtm/
tags: tag1, tag2 </pre>
post-commit: gtm commit --yes
pre-push: git push origin refs/notes/gtm-data --no-verify
alias.fetchgtm: fetch origin refs/notes/gtm-data:refs/notes/gtm-data
alias.pushgtm: push origin refs/notes/gtm-data
notes.rewriteMode: concatenate
notes.rewriteRef: refs/notes/gtm-data
add fetch ref: +refs/notes/gtm-data:refs/notes/gtm-data
terminal: true
.gitignore: /.gtm/
tags: tag1, tag2
</pre>

### Edit some files in your project

Check your progress with `gtm status`.
Check your progress with `gtm status`.

<pre>$ gtm status

Expand Down Expand Up @@ -91,37 +83,38 @@ Time data can be retrieved from the remote repository by fetching.

For help from the command line type `gtm --help` and `gtm <subcommand> --help`.

For additional help please consult the [Wiki](https://github.com/kilpkonn/gtm-enhanced/wiki).
For additional help please consult the [Wiki](https://github.com/DEVELOPEST/gtm-core/wiki).

# Contributing
If you find a bug or have an idea for a new feature please feel free to file new issues and submits PRs. In particular if there isn't a plugin for your favorite editor, go ahead and create one!
If you find a bug or have an idea for a new feature please feel free to file new issues and submits PRs.
In a particular if there isn't a plugin for your favorite editor, go ahead and create one!

For more detail on how to write plugins, check out the [Wiki](https://github.com/kilpkonn/gtm-enhanced/wiki/Editor-Plugins).
For more detail on how to write plugins, check out the [Wiki](https://github.com/DEVELOPEST/gtm-core/wiki/Editor-Plugins).

# Building from source

### Install go
You can follow any go installation tutorial, one for ubuntu for example: https://medium.com/golang-basics/installing-go-on-ubuntu-b443a8f0eb55
You can follow any go installation tutorial, one for Ubuntu for example: https://medium.com/golang-basics/installing-go-on-ubuntu-b443a8f0eb55

### Install apt dependencies
```bash
sudo apt-get install libgit2-dev libssh2-1-dev libssl-dev cmake
```

### Clone gtm-enhanced
### Clone gtm-core
```bash
git clone https://github.com/kilpkonn/gtm-enhanced.git
mv gtm-enhanced $GOPATH/src/github.com/kilpkonn/
cd $GOPATH/src/github.com/kilpkonn/gtm-enhanced
git submodule update --init # Install vendor dependecies
git clone https://github.com/DEVELOPEST/gtm-core.git
mv gtm-core $GOPATH/src/github.com/DEVELOPEST/
cd $GOPATH/src/github.com/DEVELOPEST/gtm-core
git submodule update --init # Install vendor dependecies
```

### Install dependencies
```bash
go get -d github.com/Masterminds/sprig
go get -d github.com/libgit2/git2go
cd $GOPATH/src/github.com/libgit2/git2go
git submodule update --init # get libgit2
git submodule update --init # get libgit2
cd vendor/libgit2
mkdir build && cd build
cmake ..
Expand All @@ -133,13 +126,13 @@ make install-static

### Build
```bash
cd $GOPATH/src/github.com/kilpkonn/gtm-enhanced
cd $GOPATH/src/github.com/DEVELOPEST/gtm-core
mkdir build
go build -o build/ ./...
```

# Support

To report a bug, please submit an issue on the [GitHub Page](https://github.com/kilpkonn/gtm-enhanced/issues)
To report a bug, please submit an issue on the [GitHub Page](https://github.com/DEVELOPEST/gtm-core/issues)

Consult the [Wiki](https://github.com/kilpkonn/gtm-enhanced/wiki) for more information.
Consult the [Wiki](https://github.com/DEVELOPEST/gtm-core/wiki) for more information.
4 changes: 2 additions & 2 deletions command/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"flag"
"strings"

"github.com/kilpkonn/gtm-enhanced/project"
"github.com/kilpkonn/gtm-enhanced/util"
"github.com/DEVELOPEST/gtm-core/project"
"github.com/DEVELOPEST/gtm-core/util"
"github.com/mitchellh/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions command/clean_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"testing"

"github.com/kilpkonn/gtm-enhanced/project"
"github.com/kilpkonn/gtm-enhanced/util"
"github.com/DEVELOPEST/gtm-core/project"
"github.com/DEVELOPEST/gtm-core/util"
"github.com/mitchellh/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion command/commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"flag"
"strings"

"github.com/kilpkonn/gtm-enhanced/metric"
"github.com/DEVELOPEST/gtm-core/metric"
"github.com/mitchellh/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion command/commit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"
"testing"

"github.com/kilpkonn/gtm-enhanced/util"
"github.com/DEVELOPEST/gtm-core/util"
"github.com/mitchellh/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions command/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"flag"
"strings"

"github.com/kilpkonn/gtm-enhanced/project"
"github.com/kilpkonn/gtm-enhanced/util"
"github.com/DEVELOPEST/gtm-core/project"
"github.com/DEVELOPEST/gtm-core/util"

"github.com/mitchellh/cli"
)
Expand Down
Loading

0 comments on commit fbf089b

Please sign in to comment.