diff --git a/.build.yml b/.build.yml index f21034b..e79ae95 100644 --- a/.build.yml +++ b/.build.yml @@ -11,7 +11,13 @@ tasks: go test -v ./... - build: | cd scotty - goreleaser release --snapshot --clean + GIT_REF=$(git describe --always) + if [[ "$GIT_REF" =~ ^v[0-9]+\.[0-9]+(\.[0-9]+)?$ ]] + then + goreleaser release --clean + else + goreleaser release --snapshot --clean + fi - publish-redirect: | # Update redirect on https://go.uploadedlobster.com/scotty ./scotty/pages/publish.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 69adc4c..06b612a 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -31,12 +31,14 @@ archives: - format: tar.gz # this name template makes the OS and Arch compatible with the results of `uname`. name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ + {{ .ProjectName }}-{{ .Version }}_ + {{- if eq .Os "darwin" }}macos + {{- else }}{{ .Os }}{{ end }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} {{- if .Arm }}v{{ .Arm }}{{ end }} + wrap_in_directory: true # use zip for windows archives format_overrides: - goos: windows @@ -44,6 +46,10 @@ archives: files: - COPYING - README.md + - config.example.toml + +release: + disable: true # changelog: # sort: asc diff --git a/README.md b/README.md index 771a66c..3432851 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ This requires `go` to be installed on your system. You can get it from https://g ## Configuration -Scotty requires the configuration of the services in a configuration file in TOML format. See [scotty.example.toml](./scotty.example.toml) for details. +Scotty requires the configuration of the services in a configuration file in TOML format. See [config.example.toml](./config.example.toml) for details. ## Usage diff --git a/scotty.example.toml b/config.example.toml similarity index 100% rename from scotty.example.toml rename to config.example.toml diff --git a/go.mod b/go.mod index 0d85553..e8feb7c 100644 --- a/go.mod +++ b/go.mod @@ -9,6 +9,7 @@ require ( github.com/glebarez/sqlite v1.10.0 github.com/go-resty/resty/v2 v2.10.0 github.com/jarcoal/httpmock v1.3.1 + github.com/shkh/lastfm-go v0.0.0-20191215035245-89a801c244e0 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.17.0 github.com/stretchr/testify v1.8.4 @@ -44,7 +45,6 @@ require ( github.com/rivo/uniseg v0.4.4 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/shkh/lastfm-go v0.0.0-20191215035245-89a801c244e0 // indirect github.com/sourcegraph/conc v0.3.0 // indirect github.com/spf13/afero v1.10.0 // indirect github.com/spf13/cast v1.5.1 // indirect