Skip to content

Commit

Permalink
Merge branch 'main' of github.com:lucassabreu/clockify-cli into issue…
Browse files Browse the repository at this point in the history
…/232
  • Loading branch information
lucassabreu committed Feb 9, 2024
2 parents a191cf2 + 844eac3 commit 5453074
Show file tree
Hide file tree
Showing 34 changed files with 1,368 additions and 138 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.17
- uses: actions/checkout@v3
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ on:
pull_request:
push:
tags:
- '*'
- "*"

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: go-setup
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.17
- name: install snapcraft
Expand All @@ -23,7 +23,7 @@ jobs:
mkdir -p $HOME/.cache/snapcraft/download
mkdir -p $HOME/.cache/snapcraft/stage-packages
- name: goreleaser-setup
uses: goreleaser/goreleaser-action@v2
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-unit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-go@v3
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: 1.17

- name: Check out code into the Go module directory
uses: actions/checkout@v1

- name: Get dependencies
run: |
go mod download
Expand All @@ -25,7 +25,7 @@ jobs:
./...
- name: Upload coverage report
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
Expand Down
25 changes: 13 additions & 12 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,30 +12,31 @@ builds:

archives:
- id: default
replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
name_template: >-
{{- .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end -}}
format_overrides:
- goos: windows
format: zip
files:
- LICENSE

checksum:
name_template: 'checksums.txt'
name_template: "checksums.txt"

snapshot:
name_template: '{{ .Tag }}-next'
name_template: "{{ .Tag }}-next"

changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
- "^docs:"
- "^test:"

snapcrafts:
- name: clockify-cli
Expand All @@ -47,10 +48,10 @@ snapcrafts:

apps:
clockify-cli:
plugs: ['network']
plugs: ["network"]

brews:
- tap:
- repository:
owner: lucassabreu
name: homebrew-tap
folder: Formula
Expand Down
9 changes: 9 additions & 0 deletions .mockery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
with-expecter: true
dir: "internal/mocks"
packages:
github.com/lucassabreu/clockify-cli/internal/mocks:
interfaces:
Client:
Config:
Factory:
TimeEntryDefaults:
38 changes: 37 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,39 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v0.47.0] - 2024-02-09

### Added

- new flag `--client` to filter projects by client when managing time entries

### Changed

- `mockey` update and its configuration has changed
- github actions steps updated to node20

## [v0.46.0] - 2023-12-06

### Added

- support for the formats `HMM` and `HHMM` for time input

### Fixed

- update github actions workflows to use newer actions

### Thanks

Thank you to [@aVolpe](https://github.com/aVolpe) for implementing new time formats as input
on PR [#251](https://github.com/lucassabreu/clockify-cli/pull/251).

## [v0.45.0] - 2023-08-05

### Added

- new function `since` to be used on the time entry format to help working with time
- new function `until` to be used on the time entry format to help working with time

## [v0.44.2] - 2023-04-04

### Fixed
Expand Down Expand Up @@ -1102,7 +1135,10 @@ time entry.
- Golang CLI using [cobra](https://github.com/spf13/cobra)
- Makefile to help setup actions

[Unreleased]: https://github.com/lucassabreu/clockify-cli/compare/v0.44.2...HEAD
[Unreleased]: https://github.com/lucassabreu/clockify-cli/compare/v0.47.0...HEAD
[v0.47.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.47.0
[v0.46.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.46.0
[v0.45.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.45.0
[v0.44.2]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.44.2
[v0.44.1]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.44.1
[v0.44.0]: https://github.com/lucassabreu/clockify-cli/releases/tag/v0.44.0
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ go-install: deps-install ## install dev version
go install $(MAIN_PKG)

go-generate: deps-install ## recreates generate files
go install github.com/vektra/mockery/v2@v2.15.0
go generate ./...
go install github.com/vektra/mockery/v2@v2.40.3
mockery

test-install: deps-install go-generate
go install gotest.tools/gotestsum@latest
Expand Down Expand Up @@ -66,7 +66,7 @@ tag=
release: ## releases a tagged version
sed "/^## \[$(tag)/, /^## \[/!d" CHANGELOG.md | tail -n +2 | head -n -2 > /tmp/rn.md
curl -sL https://git.io/goreleaser | bash /dev/stdin --release-notes /tmp/rn.md \
--rm-dist $(if $(SNAPSHOT),--snapshot --skip-publish,)
--clean $(if $(SNAPSHOT),--snapshot --skip-publish,)
ifneq ($(SNAPSHOT),1)
curl -X POST -d '{"trigger_branch":"$(tag)","trigger_title":"Releasing $(tag)"}' https://api.netlify.com/build_hooks/5eef4f99028bddbb4093e4c6 -v
endif
Expand Down
3 changes: 0 additions & 3 deletions internal/mocks/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ import (
"github.com/lucassabreu/clockify-cli/pkg/cmdutil"
)

//go:generate mockery --name=Factory --inpackage --with-expecter
type Factory interface {
cmdutil.Factory
}

//go:generate mockery --name=Config --inpackage --with-expecter
type Config interface {
cmdutil.Config
}

//go:generate mockery --name=Client --inpackage --with-expecter
type Client interface {
api.Client
}
Expand Down
Loading

0 comments on commit 5453074

Please sign in to comment.