From a25d692258a00b1eca19da8874ab8e22b8e46625 Mon Sep 17 00:00:00 2001 From: Quentin Lemaire Date: Tue, 15 Nov 2022 00:05:19 +0000 Subject: [PATCH] Force new build --- .chglog/CHANGELOG.tpl.md | 32 ++++++++++++++++++++++++++++++++ .chglog/config.yml | 28 ++++++++++++++++++++++++++++ CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++++++++ Taskfile.yml | 24 +++++++++++++++++------- 4 files changed, 115 insertions(+), 7 deletions(-) create mode 100755 .chglog/CHANGELOG.tpl.md create mode 100755 .chglog/config.yml create mode 100644 CHANGELOG.md diff --git a/.chglog/CHANGELOG.tpl.md b/.chglog/CHANGELOG.tpl.md new file mode 100755 index 0000000..3069bfe --- /dev/null +++ b/.chglog/CHANGELOG.tpl.md @@ -0,0 +1,32 @@ +{{ range .Versions }} + +## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} + +> {{ datetime "2006-01-02" .Tag.Date }} + +{{ range .CommitGroups -}} +### {{ .Title }} + +{{ range .Commits -}} +* {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ .Subject }} +{{ end }} +{{ end -}} + +{{- if .RevertCommits -}} +### Reverts + +{{ range .RevertCommits -}} +* {{ .Revert.Header }} +{{ end }} +{{ end -}} + +{{- if .NoteGroups -}} +{{ range .NoteGroups -}} +### {{ .Title }} + +{{ range .Notes }} +{{ .Body }} +{{ end }} +{{ end -}} +{{ end -}} +{{ end -}} \ No newline at end of file diff --git a/.chglog/config.yml b/.chglog/config.yml new file mode 100755 index 0000000..716a205 --- /dev/null +++ b/.chglog/config.yml @@ -0,0 +1,28 @@ +style: github +template: CHANGELOG.tpl.md +info: + title: CHANGELOG + repository_url: https://github.com/SkYNewZ/twitch-clip +options: + commits: + # filters: + # Type: + # - feat + # - fix + # - perf + # - refactor + commit_groups: + # title_maps: + # feat: Features + # fix: Bug Fixes + # perf: Performance Improvements + # refactor: Code Refactoring + header: + pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$" + pattern_maps: + - Type + - Scope + - Subject + notes: + keywords: + - BREAKING CHANGE \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..fce2384 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,38 @@ + + +## v0.0.2 + +> 2021-12-13 + +### Feat + +* Use Taskfile +* Windows artifact is okay +* Refacto assets and make a Windows build +* Make player and streamlink public packages +* Make a real player package +* Stop using global vars +* **app:** Open Twitch button +* **notification:** Implement notifications on macOS +* **windows:** Setup notification + +### Fix + +* Various fixes +* Some refactoring +* Refacto streamlink client +* Refacto main app +* Logger issues on Windows +* Upgrade to Go 1.17 +* Create golangci-lint config file +* Do not stop routines when error occured +* Make logger on both syslog and stdout +* PATH issues +* Some refactoring +* PATH workaround only for unix distros +* **display:** Use user login if username not received yet +* **logger:** Do not include syslog on incompatible distros +* **notification:** Run server only if supported +* **notification:** Trigger notification if set in config file +* **windows:** Images are now displayed + diff --git a/Taskfile.yml b/Taskfile.yml index 7ee2336..4daba3f 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -19,23 +19,23 @@ tasks: - rm -rf out/* build: + desc: Build binary cmds: - go mod tidy - go build ./... lint: + desc: Lint cmds: - golangci-lint run ./... tests: + desc: Go tests cmds: - go test -v ./... - mod: - cmds: - - go mod download - generate: + desc: Generate assets cmds: - go generate ./... sources: @@ -48,15 +48,17 @@ tasks: - internal/icon/icon_windows.go build:darwin: + desc: Build for darwin/amd64 deps: [ generate ] cmds: - - go build -ldflags="-s -w -X 'main.twitchClientID=${TWITCH_CLIENT_ID}' -X 'main.twitchClientSecret=${TWITCH_SECRET_ID}'" -tags production -o "{{.TEMP}}/twitch_clip_${GOOS}_${GOARCH}" . + - go build -a -ldflags="-s -w -X 'main.twitchClientID=${TWITCH_CLIENT_ID}' -X 'main.twitchClientSecret=${TWITCH_SECRET_ID}'" -tags production -o "{{.TEMP}}/twitch_clip_${GOOS}_${GOARCH}" . env: GOOS: darwin GOARCH: amd64 CGO_ENABLED: "1" package:darwin: + desc: Package binary as macOS app deps: [ build:darwin ] cmds: - go run hack/macapp.go -assets "{{.TEMP}}" -bin "twitch_clip_${GOOS}_${GOARCH}" -icon ./assets/icon1080.png -identifier com.skynewz.twitchclip -name "Twitch Clip" -o ./out/ @@ -66,9 +68,10 @@ tasks: GOARCH: amd64 build:windows: + desc: Build windows/amd64 deps: [ generate ] cmds: - - go build -ldflags="-s -w -X 'main.twitchClientID=${TWITCH_CLIENT_ID}' -X 'main.twitchClientSecret=${TWITCH_SECRET_ID}' -H=windowsgui" -tags production -o "out/twitch_clip_${GOOS}_${GOARCH}_{{ .VERSION }}.exe" . + - go build -a -ldflags="-s -w -X 'main.twitchClientID=${TWITCH_CLIENT_ID}' -X 'main.twitchClientSecret=${TWITCH_SECRET_ID}' -H=windowsgui" -tags production -o "out/twitch_clip_${GOOS}_${GOARCH}_{{ .VERSION }}.exe" . env: GOOS: windows GOARCH: amd64 @@ -77,11 +80,18 @@ tasks: CXX: x86_64-w64-mingw32-g++ build:linux: + desc: Build linux/amd64 deps: [ generate ] cmds: - - go build -ldflags="-s -w -X 'main.twitchClientID=${TWITCH_CLIENT_ID}' -X 'main.twitchClientSecret=${TWITCH_SECRET_ID}'" -tags production -o "out/twitch_clip_${GOOS}_${GOARCH}_{{ .VERSION }}.exe" . + - go build -a -ldflags="-s -w -X 'main.twitchClientID=${TWITCH_CLIENT_ID}' -X 'main.twitchClientSecret=${TWITCH_SECRET_ID}'" -tags production -o "out/twitch_clip_${GOOS}_${GOARCH}_{{ .VERSION }}.exe" . env: GOOS: linux GOARCH: amd64 CGO_ENABLED: "1" CC: gcc + + changelog: + desc: Update CHANGELOG.md + cmds: + - git-chglog > CHANGELOG.md +