From 10a7d7a88d4bb3789d568cd3102d10bb69350860 Mon Sep 17 00:00:00 2001 From: Tim Schrodi Date: Mon, 1 Mar 2021 13:55:12 +0100 Subject: [PATCH] update go.mod release behavior --- .ci/next_version | 26 ++++++++++++++++++++++++++ .ci/pipeline_definitions | 1 + go.mod | 2 +- vendor/modules.txt | 2 +- 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100755 .ci/next_version diff --git a/.ci/next_version b/.ci/next_version new file mode 100755 index 000000000..35a64e4a1 --- /dev/null +++ b/.ci/next_version @@ -0,0 +1,26 @@ +#!/bin/bash + +# SPDX-FileCopyrightText: 2020 SAP SE or an SAP affiliate company and Gardener contributors +# +# SPDX-License-Identifier: Apache-2.0 + +set -o errexit +set -o nounset +set -o pipefail + +apk add --no-cache git make musl-dev curl +curl -LO https://golang.org/dl/go1.16.linux-amd64.tar.gz +tar -C /usr/local -xzf go1.16.linux-amd64.tar.gz +export PATH=$PATH:/usr/local/go/bin +mkdir /lib64 && ln -s /lib/libc.musl-x86_64.so.1 /lib64/ld-linux-x86-64.so.2 + +SOURCE_DIR="$(dirname $0)/.." + +# revert the version update in the gomod file +VERSION=$(cat ${SOURCE_DIR}/VERSION) + +sed -i "s@github.com/gardener/landscaper/apis $VERSION@github.com/gardener/landscaper/apis v0.0.0-00010101000000-000000000000@" \ + ${SOURCE_DIR}/go.mod + +cd $SOURCE_DIR +make revendor diff --git a/.ci/pipeline_definitions b/.ci/pipeline_definitions index c0153bf85..2870e030a 100644 --- a/.ci/pipeline_definitions +++ b/.ci/pipeline_definitions @@ -63,6 +63,7 @@ landscaper: release: nextversion: 'bump_minor' release_callback: '.ci/release' + next_version_callback: '.ci/next_version' git_tags: - ref_template: 'refs/tags/{VERSION}' - ref_template: 'refs/tags/apis/{VERSION}' diff --git a/go.mod b/go.mod index fecef969d..3c575a777 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/docker/cli v20.10.0-rc1+incompatible github.com/gardener/component-cli v0.14.0 github.com/gardener/component-spec/bindings-go v0.0.32 - github.com/gardener/landscaper/apis v0.6.0 + github.com/gardener/landscaper/apis v0.0.0-00010101000000-000000000000 github.com/go-logr/logr v0.3.0 github.com/go-logr/zapr v0.3.0 github.com/golang/mock v1.4.4 diff --git a/vendor/modules.txt b/vendor/modules.txt index d5e155de7..ff0db7035 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -74,7 +74,7 @@ github.com/gardener/component-spec/bindings-go/codec github.com/gardener/component-spec/bindings-go/ctf github.com/gardener/component-spec/bindings-go/oci github.com/gardener/component-spec/bindings-go/utils/selector -# github.com/gardener/landscaper/apis v0.6.0 => ./apis +# github.com/gardener/landscaper/apis v0.0.0-00010101000000-000000000000 => ./apis ## explicit github.com/gardener/landscaper/apis/config github.com/gardener/landscaper/apis/config/install