Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into thepwagner-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
thepwagner committed Dec 1, 2023
2 parents bea31c2 + a7a9f88 commit b9b6221
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 67 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # tag=v4.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Get latest Go version
id: gover
run: echo ::set-output name=goversion::$(grep "AS apk" Dockerfile.test | awk -F':|-' '!/^#/ {print $2}')
Expand All @@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # tag=v4.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: Get latest Go version
id: gover
run: echo ::set-output name=goversion::$(grep "AS apk" Dockerfile.test | awk -F':|-' '!/^#/ {print $2}')
Expand All @@ -36,12 +36,12 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc # tag=v3.7.0
with:
version: v1.51.1
version: v1.55.2
args: --timeout=5m

integration:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # tag=v4.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- run: docker build -f Dockerfile.test .
2 changes: 1 addition & 1 deletion .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions: {}

jobs:
cla:
uses: Shopify/github-workflows/.github/workflows/cla.yaml@c395c2cfd65be9a36f5dcfd21f4a2498a477fed4 # v0.0.6
uses: Shopify/github-workflows/.github/workflows/cla.yaml@6bad9c35bd35925bc9deea2de30894a057d758dc # v0.1.0
permissions:
pull-requests: write
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # tag=v4.1.0
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
with:
fetch-depth: 0
- name: Get latest Go version
Expand All @@ -26,7 +26,7 @@ jobs:
with:
go-version: "${{ steps.gover.outputs.goversion }}"
- name: Set up Cosign
uses: sigstore/cosign-installer@11086d25041f77fe8fe7b9ea4e48e3b9192b8f19 # tag=v3.1.2
uses: sigstore/cosign-installer@1fc5bd396d372bee37d608f955b336615edf79c8 # tag=v3.2.0
- uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # tag=v3.0.0
with:
registry: ghcr.io
Expand Down
4 changes: 0 additions & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ linters:
disable-all: true
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- exhaustive
- funlen
Expand All @@ -19,10 +17,8 @@ linters:
- lll
- misspell
- staticcheck
- structcheck
- typecheck
- unused
- varcheck
- whitespace
fast: false

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM alpine:3.18.4@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978
FROM alpine:3.18.5@sha256:34871e7290500828b39e22294660bee86d966bc0017544e848dd9a255cdf59e0
ENTRYPOINT ["/usr/bin/hansel"]
COPY hansel /usr/bin/hansel
4 changes: 2 additions & 2 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.3 AS deb
FROM golang:1.21.4 AS deb
WORKDIR /app
COPY go.mod .
COPY go.sum .
Expand All @@ -9,7 +9,7 @@ RUN [ "go", "test", "-v", "./internal/cli/...", "-run", "TestGenerate_InstallDeb

# This line also determines the golang version used for GitHub Actions CI
# Use the qualified image name, so Dependabot treats this separate from "golang" above.
FROM docker.io/library/golang:1.21.3-alpine AS apk
FROM docker.io/library/golang:1.21.4-alpine AS apk
ENV CGO_ENABLED=0
WORKDIR /app
COPY go.mod .
Expand Down
11 changes: 3 additions & 8 deletions cmd/hansel/main.go
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
package main

import (
"log/slog"
"os"

"github.com/Shopify/hansel/internal/cli"
"github.com/go-logr/zerologr"
"github.com/rs/zerolog"
)

func main() {
zl := zerolog.New(zerolog.NewConsoleWriter()).
With().
Timestamp().
Logger()
log := zerologr.New(&zl)
log := slog.New(slog.NewTextHandler(os.Stderr, nil))

app := cli.NewApp(log)
if err := app.Run(os.Args); err != nil {
log.Error(err, "encountered error")
log.Error("encountered error", "error", err)
os.Exit(1)
}
}
13 changes: 4 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
module github.com/Shopify/hansel

go 1.18
go 1.21

require (
github.com/go-logr/logr v1.2.4
github.com/go-logr/zerologr v1.2.3
github.com/goreleaser/nfpm/v2 v2.33.1
github.com/rs/zerolog v1.31.0
github.com/goreleaser/nfpm/v2 v2.34.0
github.com/stretchr/testify v1.8.4
github.com/urfave/cli/v2 v2.25.7
golang.org/x/sync v0.4.0
golang.org/x/sync v0.5.0
)

require (
Expand Down Expand Up @@ -40,10 +37,8 @@ require (
github.com/imdario/mergo v0.3.16 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.19 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
Expand Down
Loading

0 comments on commit b9b6221

Please sign in to comment.