diff --git a/.gitignore b/.gitignore index 851a762..2baf198 100644 --- a/.gitignore +++ b/.gitignore @@ -38,5 +38,3 @@ node_modules/ # GoReleaser /dist/ /completions/ -# template output -.goreleaser.yaml diff --git a/template.goreleaser.yaml b/.goreleaser.yaml similarity index 84% rename from template.goreleaser.yaml rename to .goreleaser.yaml index 97c2242..0edbdc5 100644 --- a/template.goreleaser.yaml +++ b/.goreleaser.yaml @@ -1,8 +1,5 @@ # Documentation at https://goreleaser.com -# This file is a template and expressions such as __PROTOC_VERSION__ are replaced -# with environment variables such as $PROTOC_VERSION before usage. - before: hooks: - ./release/completions.sh @@ -33,10 +30,10 @@ archives: - LICENSE.md - completions/* # copy protoc binaries and their .proto files previously downloaded - - src: 'release/tmp/protoc-__PROTO_VERSION__-{{ .Os }}-{{ .Arch }}/bin' + - src: 'release/tmp/protoc-{{ .Version }}-{{ .Os }}-{{ .Arch }}/bin' dst: 'protocurl-internal/bin' strip_parent: true # avoids, that protoc is copied into protocurl-internal/bin/release/tmp/.../bin - - src: 'release/tmp/protoc-__PROTO_VERSION__-{{ .Os }}-{{ .Arch }}/include/google/protobuf' + - src: 'release/tmp/protoc-{{ .Version }}-{{ .Os }}-{{ .Arch }}/include/google/protobuf' dst: 'protocurl-internal/include/google/protobuf' strip_parent: true @@ -85,13 +82,14 @@ nfpms: - src: LICENSE.md dst: /opt/protocurl/LICENSE.md # copy protoc binaries and their .proto files previously downloaded - - src: 'release/tmp/protoc-__PROTO_VERSION__-{{ .Os }}-{{ .Arch }}/bin' + - src: 'release/tmp/protoc-{{ .Version }}-{{ .Os }}-{{ .Arch }}/bin' dst: '/opt/protocurl/protocurl-internal/bin' - - src: 'release/tmp/protoc-__PROTO_VERSION__-{{ .Os }}-{{ .Arch }}/include/google/protobuf' + - src: 'release/tmp/protoc-{{ .Version }}-{{ .Os }}-{{ .Arch }}/include/google/protobuf' dst: '/opt/protocurl/protocurl-internal/include/google/protobuf' brews: - - homepage: https://gitlab.com/{{ .Env.PROJECT_PATH }} + - name: protocurl@{{ .Major }}.{{ .Minor }}.{{ .Patch }} + homepage: https://gitlab.com/{{ .Env.PROJECT_PATH }} description: >- protoCURL is cURL for Protobuf: The command-line tool for interacting with Protobuf over @@ -104,7 +102,7 @@ brews: owner: qaware name: homebrew-tap branch: main - token: "{{ .Env.GH_TOKEN_QAWARE_TAP_REPO }}" # TODO: Setup token + token: "{{ .Env.GH_TOKEN_QAWARE_TAP_REPO }}" folder: Formula dependencies: - name: curl diff --git a/RELEASE.md b/RELEASE.md index 0de57ce..cf9f9d7 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,7 +3,7 @@ We use [GoReleaser](https://goreleaser.com/) to create static binaries and Docker Buildx to build multi-architecture images. -The relevant configuration for the release process is in [template.goreleaser.yml](template.goreleaser.yaml) +The relevant configuration for the release process is in [.goreleaser.yml](.goreleaser.yaml) and [release/source.sh](release/source.sh). It **automatically** fetches the **latest** Go, Goreleaser and Protobuf versions via GitHub API. diff --git a/release/30-build-go-archive.sh b/release/30-build-go-archive.sh index 9c71d27..00267d9 100755 --- a/release/30-build-go-archive.sh +++ b/release/30-build-go-archive.sh @@ -3,9 +3,6 @@ set -euo pipefail source release/source.sh -cp template.goreleaser.yaml .goreleaser.yaml -sed -i "s/__PROTO_VERSION__/$PROTO_VERSION/g" .goreleaser.yaml - set -x goreleaser check