Skip to content

Commit

Permalink
chore: upgrade go deps, onboard renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusramberg committed Nov 26, 2024
1 parent 4f45e48 commit 6f2a4d4
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 18 deletions.
1 change: 1 addition & 0 deletions .github/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: true
43 changes: 31 additions & 12 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,24 +1,43 @@
{ pkgs ? (let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in import (fetchTree nixpkgs.locked) {
overlays = [ (import "${fetchTree gomod2nix.locked}/overlay.nix") ];
}), buildGoApplication ? pkgs.buildGoApplication }:
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in
import (fetchTree nixpkgs.locked) {
overlays = [ (import "${fetchTree gomod2nix.locked}/overlay.nix") ];
}
),
buildGoApplication ? pkgs.buildGoApplication,
}:
let
helmWrap = with pkgs;
helmWrap =
with pkgs;
wrapHelm kubernetes-helm {
plugins = with kubernetes-helmPlugins; [ helm-diff helm-git ];
plugins = with kubernetes-helmPlugins; [
helm-diff
helm-git
];
};
helmfileWrap =
pkgs.helmfile-wrapped.override { inherit (helmWrap) pluginsDir; };
in buildGoApplication {
helmfileWrap = pkgs.helmfile-wrapped.override { inherit (helmWrap) pluginsDir; };
in
buildGoApplication {
pname = "helmfile-nix";
version = "0.1";
pwd = ./.;
src = ./.;
nativeBuildInputs = with pkgs; [ nix helmWrap helmfileWrap ];
nativeBuildInputs = with pkgs; [
nix
helmWrap
helmfileWrap
];
modules = ./gomod2nix.toml;
preCheck = ''
export HOME=$TMPDIR
go test -coverprofile=coverage.txt -v 2>&1 ./... | ${pkgs.go-junit-report}/bin/go-junit-report > report.xml
ls -l
mkdir -p $out
cp report.xml coverage.txt $out/
'';
postCheck = '''';
}
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/reMarkable/cloud-shared-services/helmfile-nix
go 1.22.1

require (
github.com/jessevdk/go-flags v1.5.0
github.com/jessevdk/go-flags v1.6.1
gopkg.in/yaml.v3 v3.0.1
)

require github.com/sergi/go-diff v1.3.1 // indirect

require (
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883
golang.org/x/sys v0.19.0 // indirect
golang.org/x/sys v0.27.0 // indirect
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc=
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
github.com/jessevdk/go-flags v1.6.1 h1:Cvu5U8UGrLay1rZfv/zP7iLpSHGUZ/Ou68T0iX1bBK4=
github.com/jessevdk/go-flags v1.6.1/go.mod h1:Mk8T1hIAWpOiJiHa9rJASDK2UGWji0EuPGBnNLMooyc=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
Expand All @@ -20,6 +22,8 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s=
golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
8 changes: 4 additions & 4 deletions gomod2nix.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ schema = 3
version = "v0.0.0-20170406064948-c7f18ee00883"
hash = "sha256-2XoKB20lN+KGnAb/eVv1NcU/CcSdUPcvVNiXF/uUmOg="
[mod."github.com/jessevdk/go-flags"]
version = "v1.5.0"
hash = "sha256-3VCQpnUCZhjmjjdOZ2SKrUbDR5gUkYuNADNWzFhZLX8="
version = "v1.6.1"
hash = "sha256-Q5WFTgRxYio0+ay3sbQeBPKeJAFvOdiDVkaTVn3hoTA="
[mod."github.com/sergi/go-diff"]
version = "v1.3.1"
hash = "sha256-XLA/BLIPuUU76yikXqIeRSXr7T7A3Uz6I27+mDxGj7w="
[mod."golang.org/x/sys"]
version = "v0.19.0"
hash = "sha256-cmuL31TYLJmDm/fDnI2Sn0wB88cpdOHV1+urorsJWx4="
version = "v0.27.0"
hash = "sha256-BXQcF9RrJ55Pq7Nl67TeFGkgkyuKkQ8hHKN4/L4ggWc="
[mod."gopkg.in/yaml.v3"]
version = "v3.0.1"
hash = "sha256-FqL9TKYJ0XkNwJFnq9j0VvJ5ZUU1RvH/52h/f5bkYAU="

0 comments on commit 6f2a4d4

Please sign in to comment.