Skip to content

Commit

Permalink
feat: Almost final step
Browse files Browse the repository at this point in the history
  • Loading branch information
qa-alexander-eimer committed Oct 23, 2023
1 parent 735aa5b commit 4949473
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 15 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Expand Up @@ -38,5 +38,3 @@ node_modules/
# GoReleaser
/dist/
/completions/
# template output
.goreleaser.yaml
16 changes: 7 additions & 9 deletions template.goreleaser.yaml → .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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion RELEASE.md
Expand Up @@ -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.

Expand Down
3 changes: 0 additions & 3 deletions release/30-build-go-archive.sh
Expand Up @@ -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
Expand Down

0 comments on commit 4949473

Please sign in to comment.