Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ jobs:
go-version-file: go.mod
cache: false

- name: Validate release configuration
env:
PB_CLOUD_ORCHESTRATOR_URL: ${{ vars.PB_CLOUD_ORCHESTRATOR_URL }}
run: test -n "$PB_CLOUD_ORCHESTRATOR_URL"

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
Expand All @@ -32,6 +37,7 @@ jobs:
args: release --parallelism 1 --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PB_CLOUD_ORCHESTRATOR_URL: ${{ vars.PB_CLOUD_ORCHESTRATOR_URL }}

- name: Update Homebrew tap
env:
Expand Down
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ builds:
- -trimpath
- -tags=kqueue
ldflags:
- -s -w -X main.Version=v{{ .Version }} -X main.Commit={{ .ShortCommit }}
- -s -w -X main.Version=v{{ .Version }} -X main.Commit={{ .ShortCommit }} -X github.com/parseablehq/pb/pkg/config.CloudOrchestratorURL={{ .Env.PB_CLOUD_ORCHESTRATOR_URL }}

archives:
- name_template: "pb_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
Expand Down
3 changes: 3 additions & 0 deletions buildscripts/gen-ldflags.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ func genLDFlags(version string) string {
var ldflagsStr string
ldflagsStr = "-s -w -X main.Version=" + version + " "
ldflagsStr = ldflagsStr + "-X main.Commit=" + commitID()[:6]
if orchestratorURL := os.Getenv("PB_CLOUD_ORCHESTRATOR_URL"); orchestratorURL != "" {
ldflagsStr += " -X github.com/parseablehq/pb/pkg/config.CloudOrchestratorURL=" + orchestratorURL
}
return ldflagsStr
}

Expand Down
Loading
Loading