Skip to content

Commit

Permalink
Upgrade go and fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Natalie Arellano <narellano@vmware.com>
  • Loading branch information
natalieparellano committed Oct 8, 2024
1 parent dd23dd7 commit 3908b62
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-s390x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ jobs:
script: |
apt-get update -y
apt-get install -y wget curl git make gcc jq docker.io
wget https://go.dev/dl/go1.22.2.linux-s390x.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.22.2.linux-s390x.tar.gz
wget https://go.dev/dl/go1.23.2.linux-s390x.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.2.linux-s390x.tar.gz
export PATH=$PATH:/usr/local/go/bin
git clone ${GH_REPOSITORY} lifecycle
cd lifecycle && git checkout ${GH_REF}
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LDFLAGS+=-X 'github.com/buildpacks/lifecycle/cmd.Version=$(LIFECYCLE_VERSION)'
GOBUILD:=go build $(GOFLAGS) -ldflags "$(LDFLAGS)"
GOTEST=$(GOCMD) test $(GOFLAGS)
BUILD_DIR?=$(PWD)$/out
WINDOWS_COMPILATION_IMAGE?=golang:1.22-windowsservercore-1809
WINDOWS_COMPILATION_IMAGE?=golang:1.23-windowsservercore-1809
SOURCE_COMPILATION_IMAGE?=lifecycle-img
BUILD_CTR?=lifecycle-ctr
DOCKER_CMD?=make test
Expand Down Expand Up @@ -357,7 +357,7 @@ install-mockgen:

install-golangci-lint:
@echo "> Installing golangci-lint..."
$(GOCMD) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.57.2
$(GOCMD) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0

lint: install-golangci-lint
@echo "> Linting code..."
Expand Down
2 changes: 1 addition & 1 deletion acceptance/testdata/launcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22 as builder
FROM golang:1.23 as builder

COPY exec.d/ /go/src/exec.d
RUN GO111MODULE=off go build -o helper ./src/exec.d
Expand Down
2 changes: 1 addition & 1 deletion acceptance/testdata/launcher/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22-nanoserver-1809
FROM golang:1.23-nanoserver-1809

COPY exec.d/ /go/src/exec.d
WORKDIR /go/src
Expand Down
6 changes: 3 additions & 3 deletions cmd/lifecycle/restorer.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (r *restoreCmd) Exec() error {
}
analyzedMD.BuildImage = &files.ImageIdentifier{Reference: digestRef.String()}
cmd.DefaultLogger.Debugf("Adding build image info to analyzed metadata: ")
cmd.DefaultLogger.Debugf(encoding.ToJSONMaybe(analyzedMD.BuildImage))
cmd.DefaultLogger.Debug(encoding.ToJSONMaybe(analyzedMD.BuildImage))
}
var (
runImage imgutil.Image
Expand Down Expand Up @@ -188,11 +188,11 @@ func (r *restoreCmd) updateAnalyzedMD(analyzedMD *files.Analyzed, runImage imgut
}
}
cmd.DefaultLogger.Debugf("Run image info in analyzed metadata was: ")
cmd.DefaultLogger.Debugf(encoding.ToJSONMaybe(analyzedMD.RunImage))
cmd.DefaultLogger.Debug(encoding.ToJSONMaybe(analyzedMD.RunImage))
analyzedMD.RunImage.Reference = digestRef.String()
analyzedMD.RunImage.TargetMetadata = targetData
cmd.DefaultLogger.Debugf("Run image info in analyzed metadata is: ")
cmd.DefaultLogger.Debugf(encoding.ToJSONMaybe(analyzedMD.RunImage))
cmd.DefaultLogger.Debug(encoding.ToJSONMaybe(analyzedMD.RunImage))
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ require (
google.golang.org/protobuf v1.34.1 // indirect
)

go 1.22
go 1.23
2 changes: 1 addition & 1 deletion phase/rebaser.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (r *Rebaser) validateTarget(appImg imgutil.Image, newBaseImg imgutil.Image)
}
if rebasable == "false" {
if !r.Force {
return fmt.Errorf(msgAppImageNotMarkedRebasable + "; " + msgProvideForceToOverride)
return fmt.Errorf("%s; %s", msgAppImageNotMarkedRebasable, msgProvideForceToOverride)
}
r.Logger.Warn(msgAppImageNotMarkedRebasable)
}
Expand Down

0 comments on commit 3908b62

Please sign in to comment.