From 83f70877c868ed2133e5fd7bd95809acc1c783ce Mon Sep 17 00:00:00 2001 From: Jeffrey Regan Date: Mon, 21 Oct 2019 15:50:51 -0700 Subject: [PATCH] Define the API release process. --- .travis.yml | 8 ++++++-- api/{kustapiversion => }/main.go | 0 releasing/README.md | 16 ++++++---------- releasing/cloudbuild.sh | 10 +--------- releasing/localbuild.sh | 8 ++------ 5 files changed, 15 insertions(+), 27 deletions(-) rename api/{kustapiversion => }/main.go (100%) diff --git a/.travis.yml b/.travis.yml index 859e283c7..4cf482a0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,11 @@ os: - linux - - osx -# TODO: Uncomment when tests running on Windows. +# TODO: Uncomment this when someone figures out how +# to speed up the slowness of homebrew installation on +# oxs; presumably cache images? +# - osx +# +# TODO: Uncomment when some gets the tests running on Windows. # - windows addons: diff --git a/api/kustapiversion/main.go b/api/main.go similarity index 100% rename from api/kustapiversion/main.go rename to api/main.go diff --git a/releasing/README.md b/releasing/README.md index e5475ad77..341311796 100644 --- a/releasing/README.md +++ b/releasing/README.md @@ -22,7 +22,7 @@ These modules release independently. | Module Description | Module Prefix | Tag | Branch Name | | --- | ------ | --- | --- | | kustomize executable | [`sigs.k8s.io/kustomize/kustomize`] | _kustomize/v{major}.{minor}.{patch}_ | _release-kustomize-v{major}.{minor}_ | -| kustomize Go API | [`sigs.k8s.io/kustomize`] | _v{major}.{minor}.{patch}_ | _release-api-v{major}.{minor}_ | +| kustomize Go API | [`sigs.k8s.io/kustomize/api`] | _api/v{major}.{minor}.{patch}_ | _release-api-v{major}.{minor}_ | | pluginator executable | [`sigs.k8s.io/kustomize/pluginator`] | _pluginator/v{major}.{minor}.{patch}_ | _release-pluginator-v{major}.{minor}_ | @@ -48,7 +48,7 @@ See the [installation instructions](../docs/INSTALL.md) to perform an install. -### sigs.k8s.io/kustomize +### sigs.k8s.io/kustomize/api This is the kustomize Go API. @@ -62,10 +62,10 @@ They include methods to read, edit and emit modified YAML. Go consumers of this API will have a `go.mod` file -_requiring_ this module at a particular tag, e.g. +requiring this module at a particular tag, e.g. ``` -require sigs.k8s.io/kustomize/v4 v4.0.1 +require sigs.k8s.io/kustomize/api v0.0.1 ``` #### Release artifacts @@ -76,7 +76,7 @@ that API clients can `require` from their `go.mod` file. Release notes should appear on the [release page]. -There's an executable called `kustapiversion`, which, if +There's an executable called `api`, which, if run, prints the API release provenance data, but it's of no practical use to an API client. @@ -218,11 +218,7 @@ git ls-remote --tags upstream ### define the release tag ``` -tag="v${major}.${minor}.${patch}" -if [ "$module" != "api" ]; then - # must prefix the tag with submodule name - tag="${module}/${tag}" -fi +tag="${module}/v${major}.${minor}.${patch}" echo "tag=$tag" ``` diff --git a/releasing/cloudbuild.sh b/releasing/cloudbuild.sh index 981266f58..ba7d97e76 100755 --- a/releasing/cloudbuild.sh +++ b/releasing/cloudbuild.sh @@ -8,16 +8,8 @@ module=$1 shift executable=$module -if [ "$module" == "api" ]; then - # For this module, there's no correspondingly named - # sub-directory, since the module is at the repo root. - # There is, however, a dummy executable in a sub-directory. - # Build that executable, primarily to give goreleaser - # something to coordinate it release process around. - executable=kustapiversion -fi -cd $executable +cd $module configFile=$(mktemp) cat <$configFile diff --git a/releasing/localbuild.sh b/releasing/localbuild.sh index 79873f2a8..1f4032241 100755 --- a/releasing/localbuild.sh +++ b/releasing/localbuild.sh @@ -2,7 +2,7 @@ # Usage - from the repository root, enter # -# ./releasing/localbuild.sh (kustomize|pluginator) +# ./releasing/localbuild.sh (kustomize|pluginator|api) # # The script attempts to use cloudbuild configuration # to create a release "locally". @@ -72,9 +72,5 @@ cloud-build-local \ echo " " echo "Result of local build:" echo "##########################################" -if [ "$module" == "api" ]; then - tree ./kustapiversion/dist -else - tree ./$module/dist -fi +tree ./$module/dist echo "##########################################"