Skip to content

Commit

Permalink
fix ld flag [goreleaser]
Browse files Browse the repository at this point in the history
  • Loading branch information
trajan0x committed Aug 7, 2024
1 parent b7c5216 commit bc86a8d
Show file tree
Hide file tree
Showing 19 changed files with 25 additions and 29 deletions.
2 changes: 1 addition & 1 deletion agents/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ builds:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# required workaround for https://github.com/Shopify/sarama/issues/2206
# See: https://github.com/golang/go/issues/35067#issuecomment-544805311 because we're statically compiling,
# without forcing netgo, we use the cgo resolver which will not work for .local (a canonical tld in kubernetes)
Expand Down
4 changes: 2 additions & 2 deletions contrib/opbot/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ builds:
binary: opbot
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
gcflags:
- all=-dwarflocationlists=true
# required workaround for https://github.com/Shopify/sarama/issues/2206
Expand All @@ -33,7 +33,7 @@ builds:
binary: signozexample
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# see above about workaround
tags:
- netgo
Expand Down
2 changes: 1 addition & 1 deletion contrib/screener-api/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ builds:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# required workaround for https://github.com/Shopify/sarama/issues/2206
# See: https://github.com/golang/go/issues/35067#issuecomment-544805311 because we're statically compiling,
# without forcing netgo, we use the cgo resolver which will not work for .local (a canonical tld in kubernetes)
Expand Down
8 changes: 6 additions & 2 deletions core/metrics/rookout.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
rookout "github.com/Rookout/GoSDK"
"github.com/Rookout/GoSDK/pkg/config"
"github.com/synapsecns/sanguine/core"
synconfig "github.com/synapsecns/sanguine/core/config"
"github.com/synapsecns/sanguine/core/metrics/internal"
"os"
)
Expand All @@ -14,8 +15,11 @@ func init() {
if core.HasEnv(internal.RookoutToken) {
// TODO: Consider doing git stuff here.
err := rookout.Start(config.RookOptions{
Token: os.Getenv(internal.RookoutToken),
Debug: core.HasEnv(internal.RookoutDebug),
Token: os.Getenv(internal.RookoutToken),
Debug: core.HasEnv(internal.RookoutDebug),
GitCommit: synconfig.DefaultCommit,
// note: will chagne on fork
GitOrigin: "https://github.com/synapsecns/sanguine",
})
if err != nil {
logger.Warn(err)
Expand Down
6 changes: 0 additions & 6 deletions docker/.dockerignore

This file was deleted.

2 changes: 1 addition & 1 deletion docker/agents.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot agents /app/agents

COPY .git /.git



ENTRYPOINT ["/app/agents"]
2 changes: 0 additions & 2 deletions docker/cctp-relayer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot cctp-relayer /app/cctp-relayer

COPY .git /.git

ENTRYPOINT ["/app/cctp-relayer"]
2 changes: 1 addition & 1 deletion docker/explorer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot explorer /app/explorer

COPY .git /.git


ENTRYPOINT ["/app/explorer"]
2 changes: 1 addition & 1 deletion docker/git-changes-action.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ COPY --from=builder /etc/passwd /etc/passwd
WORKDIR /git-changes-action
COPY git-changes-action /app/git-changes-action

COPY .git /.git


ENTRYPOINT ["/app/git-changes-action"]
2 changes: 1 addition & 1 deletion docker/omnirpc.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot omnirpc /app/omnirpc

COPY .git /.git


ENTRYPOINT ["/app/omnirpc"]
2 changes: 1 addition & 1 deletion docker/opbot.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot opbot /app/opbot

COPY .git /.git


ENTRYPOINT ["/app/opbot"]
2 changes: 1 addition & 1 deletion docker/promexporter.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot promexporter /app/promexporter

COPY .git /.git


ENTRYPOINT ["/app/promexporter"]
2 changes: 1 addition & 1 deletion docker/rfq-api.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot api /app/api

COPY .git /.git


ENTRYPOINT ["/app/api"]
2 changes: 1 addition & 1 deletion docker/rfq-relayer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot relayer /app/relayer

COPY .git /.git


ENTRYPOINT ["/app/relayer"]
2 changes: 1 addition & 1 deletion docker/screener-api.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot screener /app/screener

COPY .git /.git


ENTRYPOINT ["/app/screener"]
2 changes: 1 addition & 1 deletion docker/scribe.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ USER nonroot:nonroot
WORKDIR /app
COPY --chown=nonroot:nonroot scribe /app/scribe

COPY .git /.git


ENTRYPOINT ["/app/scribe"]
2 changes: 1 addition & 1 deletion ethergo/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ builds:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# required workaround for https://github.com/Shopify/sarama/issues/2206
# See: https://github.com/golang/go/issues/35067#issuecomment-544805311 because we're statically compiling,
# without forcing netgo, we use the cgo resolver which will not work for .local (a canonical tld in kubernetes)
Expand Down
2 changes: 1 addition & 1 deletion services/omnirpc/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ builds:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# required workaround for https://github.com/Shopify/sarama/issues/2206
# See: https://github.com/golang/go/issues/35067#issuecomment-544805311 because we're statically compiling,
# without forcing netgo, we use the cgo resolver which will not work for .local (a canonical tld in kubernetes)
Expand Down
6 changes: 3 additions & 3 deletions services/rfq/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ builds:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# required workaround for https://github.com/Shopify/sarama/issues/2206
# See: https://github.com/golang/go/issues/35067#issuecomment-544805311 because we're statically compiling,
# without forcing netgo, we use the cgo resolver which will not work for .local (a canonical tld in kubernetes)
Expand All @@ -36,7 +36,7 @@ builds:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# see above about workaround
tags:
- netgo
Expand All @@ -55,7 +55,7 @@ builds:
- all=-dwarflocationlists=true
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags '-static' -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{ .CommitDate }}
- -s -w -extldflags '-static' -X github.com/synapsecns/sanguine/core/config.DefaultVersion={{.Version}} -X github.com/synapsecns/sanguine/core/config.DefaultCommit={{.Commit}} -X github.com/synapsecns/sanguine/core/config.DefaultDate={{ .CommitDate }}
# see above about workaround
tags:
- netgo
Expand Down

0 comments on commit bc86a8d

Please sign in to comment.