Skip to content

Commit 56f18d2

Browse files
authored
chore(release): adopt shared GoReleaser Docker v2 preset (#118)
1 parent ceb72b6 commit 56f18d2

5 files changed

Lines changed: 25 additions & 48 deletions

File tree

‎.goreleaser.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project_name: stargate
44

55
includes:
66
- from_url:
7-
url: https://raw.githubusercontent.com/formancehq/earthly/refs/heads/main/.goreleaser.default.yaml
7+
url: https://raw.githubusercontent.com/formancehq/earthly/refs/heads/main/.goreleaser.default-v2.yaml
88

99

1010
builds:
@@ -25,9 +25,9 @@ builds:
2525

2626
archives:
2727
- id: "{{.ProjectName}}"
28-
builds:
28+
ids:
2929
- stargate
30-
format: tar.gz
30+
formats: [tar.gz]
3131
name_template: "{{.ProjectName}}_{{.Os}}-{{.Arch}}"
3232

3333
release:

‎build.Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM ghcr.io/formancehq/base:22.04
2-
COPY stargate /usr/bin/stargate
2+
ARG TARGETPLATFORM
3+
COPY $TARGETPLATFORM/stargate /usr/bin/stargate
34
ENV OTEL_SERVICE_NAME stargate
45
ENTRYPOINT ["/usr/bin/stargate"]
56
CMD ["client"]

‎flake.lock‎

Lines changed: 12 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flake.nix‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.2511";
66
nixpkgs-unstable.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1";
77

8-
nur = {
9-
url = "github:nix-community/NUR";
10-
inputs.nixpkgs.follows = "nixpkgs";
8+
goreleaser = {
9+
url = "github:goreleaser/nur/52282e9a2d7c6882e9e0e8675d593b928c89e323";
10+
flake = false;
1111
};
1212
};
1313

14-
outputs = { self, nixpkgs, nixpkgs-unstable, nur }:
14+
outputs = { self, nixpkgs, nixpkgs-unstable, goreleaser }:
1515
let
1616
supportedSystems = [
1717
"x86_64-linux"
@@ -25,7 +25,7 @@
2525
let
2626
pkgs = import nixpkgs {
2727
inherit system;
28-
overlays = [ nur.overlays.default ];
28+
overlays = [ ];
2929
config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
3030
"goreleaser-pro"
3131
];
@@ -55,7 +55,7 @@
5555
golangci-lint
5656
];
5757
otherPackages = [
58-
pkgs.nur.repos.goreleaser.goreleaser-pro
58+
(pkgs.callPackage "${goreleaser}/pkgs/goreleaser-pro" { })
5959
];
6060
in
6161
{

‎scratch.Dockerfile‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
FROM ghcr.io/formancehq/base:scratch
2-
COPY stargate /usr/bin/stargate
2+
ARG TARGETPLATFORM
3+
COPY $TARGETPLATFORM/stargate /usr/bin/stargate
34
ENV OTEL_SERVICE_NAME stargate
45
ENTRYPOINT ["/usr/bin/stargate"]
56
CMD ["client"]

0 commit comments

Comments
 (0)