Skip to content

Commit

Permalink
Force new build
Browse files Browse the repository at this point in the history
  • Loading branch information
SkYNewZ committed Nov 15, 2022
1 parent 151b0d2 commit a25d692
Show file tree
Hide file tree
Showing 4 changed files with 115 additions and 7 deletions.
32 changes: 32 additions & 0 deletions .chglog/CHANGELOG.tpl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{{ range .Versions }}
<a name="{{ .Tag.Name }}"></a>
## {{ 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 -}}
28 changes: 28 additions & 0 deletions .chglog/config.yml
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

<a name="v0.0.2"></a>
## 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

24 changes: 17 additions & 7 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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/
Expand All @@ -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
Expand All @@ -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

0 comments on commit a25d692

Please sign in to comment.