Verified Commit 137aa67d authored by Vladimir Shushlin's avatar Vladimir Shushlin 👆
Browse files

Merge branch '174-upgrade-go-1-20' into 'master'

Upgrade Go to 1.21.1

Closes #174

See merge request !163



Merged-by: Vladimir Shushlin's avatarVladimir Shushlin <vshushlin@gitlab.com>
Approved-by: Vladimir Shushlin's avatarVladimir Shushlin <vshushlin@gitlab.com>
Co-authored-by: default avatarJaime Martinez <jmartinez@gitlab.com>
parents 787d2d10 929ed78c
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ include:
      - '/ci/danger-review.yml'

variables:
  GO_VERSION: "1.19.1"
  GO_VERSION: "1.21.1"
  # See https://docs.gitlab.com/ee/user/packages/generic_packages/#publish-a-package-file
  PACKAGE_REGISTRY_URL: "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/generic/release-cli"

+1 −1
Original line number Diff line number Diff line
golang 1.19.1
golang 1.21.1
+2 −2
Original line number Diff line number Diff line
FROM golang:1.19.1-alpine3.16 AS builder
FROM golang:1.21.1-alpine3.18 AS builder
RUN apk --no-cache add ca-certificates make git && update-ca-certificates

COPY . /release-cli
@@ -6,7 +6,7 @@ WORKDIR /release-cli

RUN make build

FROM alpine:3.16
FROM alpine:3.18

COPY --from=builder /release-cli/bin/release-cli /usr/local/bin/release-cli
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
+1 −1
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ mocks-check: mocks
	fi;

# development tools
MOCKERY_VERSION ?= 2.10.4
MOCKERY_VERSION ?= 2.33.2
MOCKERY ?= ${CURDIR}/bin/mockery-$(MOCKERY_VERSION)

mocks: $(MOCKERY)
+19 −2
Original line number Diff line number Diff line
// Code generated by mockery v2.10.4. DO NOT EDIT.
// Code generated by mockery v2.33.2. DO NOT EDIT.

package gitlab

@@ -18,6 +18,10 @@ func (_m *MockHTTPClient) Do(_a0 *http.Request) (*http.Response, error) {
	ret := _m.Called(_a0)

	var r0 *http.Response
	var r1 error
	if rf, ok := ret.Get(0).(func(*http.Request) (*http.Response, error)); ok {
		return rf(_a0)
	}
	if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok {
		r0 = rf(_a0)
	} else {
@@ -26,7 +30,6 @@ func (_m *MockHTTPClient) Do(_a0 *http.Request) (*http.Response, error) {
		}
	}

	var r1 error
	if rf, ok := ret.Get(1).(func(*http.Request) error); ok {
		r1 = rf(_a0)
	} else {
@@ -35,3 +38,17 @@ func (_m *MockHTTPClient) Do(_a0 *http.Request) (*http.Response, error) {

	return r0, r1
}

// NewMockHTTPClient creates a new instance of MockHTTPClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockHTTPClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockHTTPClient {
	mock := &MockHTTPClient{}
	mock.Mock.Test(t)

	t.Cleanup(func() { mock.AssertExpectations(t) })

	return mock
}