Merge pull request #1667 from monopole/setupApiRelease

Define the API release process.
This commit is contained in:
Jeff Regan
2019-10-21 16:37:41 -07:00
committed by GitHub
5 changed files with 15 additions and 27 deletions

View File

@@ -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:

View File

@@ -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"
```

View File

@@ -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 <<EOF >$configFile

View File

@@ -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 "##########################################"