221 Commits

Author SHA1 Message Date
koba1t
5fd7b14fc8 update releasing/README.md to use
Helps when you have a git repository with multiple Go modules.

It handles tasks one might otherwise attempt with

'''
find ./ -name "go.mod" | xargs {some hack}
'''

Run it from a git repository root.

It walks the repository, reads 'go.mod' files, builds
a model of Go modules and intra-repo module
dependencies, then performs some operation.

Install:
'''
go get sigs.k8s.io/kustomize/cmd/gorepomod
'''

_Commands that change things (everything but 'list')
do nothing but log commands
unless you add the '--doIt' flag,
allowing the change._

_If you want to run 'gorepomod' on your fork or outside of '$GOSRC' directory, add '--local'  flag to your command._

Lists modules and intra-repo dependencies.

Use this to get module names for use in other commands.

Creates a change with mechanical updates
to 'go.mod' and 'go.sum' files.

Creates a change to 'go.mod' files.

For each module _m_ in the repository,
if _m_ depends on a _{module}_, then
_m_'s dependency on _{module} will be
replaced by a relative path to the in-repo
version of _{module}_.

If _conditionalModule_ is specified, then
the replacement of _{module}_ will happen
if _m_ depends on _{conditionalModule}_.

Creates a change to 'go.mod' files.

The opposite of 'unpin'.

The change removes replacements and pins _m_ to a
specific, previously tagged and released version of _{module}_.

The argument _{version}_ defaults to recent version of _{module}_.

_{version}_ should be in semver form, e.g. 'v1.2.3'.

Computes a new version for the module, tags the repo
with that version, and pushes the tag to the remote.

The value of the 2nd argument, either 'patch' (the default),
'minor' or 'major', determines the new version.

If the existing version is _v1.2.7_, then the new version will be:
 - 'patch' -> _v1.2.8_
 - 'minor' -> _v1.3.0_
 - 'major' -> _v2.0.0_

After establishing the version, the command looks for a branch named

> _release-{module}/-v{major}.{minor}_

If the branch doesn't exist, the command creates it and pushes it to the remote.

The command then creates a new tag in the form

> _{module}/v{major}.{minor}.{patch}_

The command pushes this tag to the remote.  This typically triggers
cloud activity to create release artifacts.

This undoes the work of 'release', by deleting the
most recent tag both locally and at the remote.

You can then fix whatever, and re-release.

This, however, must be done almost immediately.

If there's a chance someone (or some cloud robot) already
imported the module at the given tag, then don't do this,
because it will confuse module caches.

Do a new patch release instead. instead of
2025-08-28 02:54:33 +09:00
Kubernetes Prow Robot
03ae5c93ca Merge pull request #5846 from dmvolod/issue-5845-fix-version
fix: Get version from the BuildInfo.Main.Version if not found in deps and build flag
2025-06-26 14:40:29 -07:00
Liviu Costea
fd97ddaca1 fix: remove unused build arg and address warnings 2025-04-07 13:18:38 +03:00
Dmitry Volodin
9c68bd2ee2 fix: Get version from the BuildInfo.Main.Version if not found in deps and build flag 2025-01-19 09:25:33 +03:00
Kurnianto Trilaksono
25c7e17fb8 add pr rules, fix script 2024-04-24 20:30:34 +08:00
Kurnianto Trilaksono
63329d175a fix logic and add license 2024-03-29 16:49:10 +08:00
Kurnianto Trilaksono
f63e919e3e revert untouched file 2024-03-28 00:01:40 +08:00
Kurnianto Trilaksono
3d840a6584 revert untouched files 2024-03-27 23:56:57 +08:00
Kurnianto Trilaksono
846d3c09eb fix logic 2024-03-27 00:16:03 +08:00
Kurnianto Trilaksono
fbc102dbd3 add change counter 2024-03-27 00:15:00 +08:00
Kurnianto Trilaksono
a7de0cc8cd edit printout 2024-03-27 00:11:53 +08:00
Kurnianto Trilaksono
931f924189 add helper script for releasing 2024-03-24 15:22:04 +08:00
Nick
50dc813731 Add buildMetadata task and ref (#5511)
* Add buildMetadata task and ref

Move build metadata tasks, draft buildMetadata reference

Clean up buildMetadata ref

Add managed by label task

Add local non-generated task

Add local generated resource

Add remote generator task

Clean up tasks and ref

Add local transformer annotation example

Add local and remote transformer example

* Address PR feedback and general cleanup

cherrypick updates from feature branch

fix script

fix release script
2024-03-24 14:50:19 +08:00
charles-chenzz
ec3be81217 add back the missing suffix in kustomize v5.x.x in windows version
Co-authored-by: Ricardo <ricardo.bartels@telekom.de>
2023-11-13 20:08:58 +08:00
koba1t
d6fa69d26e use pushd when generate checksum 2023-10-25 05:19:25 +09:00
koba1t
b6387b9eaf fix add checksum create step in release scripts 2023-10-21 15:41:00 +09:00
koba1t
289e78c136 fix release binary archive contains unnecessary dir 2023-10-20 04:00:13 +09:00
koba1t
b1717c8a97 change_release_flow_to_build_scripts 2023-08-17 22:57:44 +09:00
koba1t
5b76aa9d2f update go 1.20 2023-06-06 22:39:06 +09:00
xin gu
4d70a36c25 emove the kyaml/openapi/kubernetesapi/v1_21_2/swagger.pb (#5077) 2023-03-23 10:48:31 -07:00
Katrina Verey
aa4eb59bb0 Fix constant reference in instructions 2023-02-07 19:54:58 -05:00
Katrina Verey
63c37b1780 Update releasing/README.md
Co-authored-by: Cailyn <cailyn.s.e@gmail.com>
2023-02-06 16:49:19 -05:00
Katrina Verey
9c116e9031 Bespoke mod edits no longer needed if gorepomod pins all modules 2023-02-02 14:23:23 -05:00
Katrina Verey
4fff8399ea Update releasing instructions 2023-02-02 11:22:00 -05:00
Katrina Verey
7e3ad53890 Allow cloud build to authenticate to gh when generating changelog 2023-02-01 17:25:57 -05:00
Katrina Verey
e4d7eaa479 Don't have empty string when no auth info 2023-02-01 16:28:20 -05:00
Katrina Verey
0c34cf4192 Allow authenticated Github use in changelog script and improve error messages 2023-02-01 15:39:38 -05:00
Cailyn
95edcc0681 Update Versioning to Improve Output (#5000)
* Update Versioning to Improve Output

* Always get commit from build info, always get date and version from ldflag

* Just replace broken main output with semver and deprecate short flag as is

---------

Co-authored-by: Katrina Verey <katrina.verey@shopify.com>
2023-02-01 11:25:37 -08:00
Katrina Verey
e9f47abcc1 Warn against partial releases 2023-01-30 15:48:58 -05:00
Katrina Verey
91a2c2b1a4 Update to Go 1.19 2022-11-17 12:57:17 -05:00
Katrina Verey
d642b959cf Regenerate token and encrypt without newline 2022-11-16 14:36:33 -05:00
Katrina Verey
0de4e0ba11 Third try new token without newline 2022-11-16 14:24:20 -05:00
Katrina Verey
b2dc88447e New token, hopefully without trailing whitespace error 2022-11-16 14:11:40 -05:00
Katrina Verey
1eccbc4e30 Rotate token for cloud build 2022-11-16 11:54:33 -05:00
natasha41575
ba77fd5b7f update release tools for go workspace mode 2022-07-11 10:34:08 -07:00
Anna Song
3fdf88d10e Allow tests to only run locally (#4664)
* Allow tests to only run locally

Allow tests that are flaky or currently unsupported on the server to run locally

* Address feedback
2022-06-08 10:04:23 -07:00
natasha41575
12adc1ff95 increase vm size for cloud build 2022-05-20 13:20:58 -07:00
Katrina Verey
fe604fd3d1 Install goreleaser into go 1.18 image for build 2022-04-06 15:51:37 -04:00
Katrina Verey
0fa010c7e7 Add missing boilerplate 2022-04-04 14:24:04 -04:00
Katrina Verey
faad014f96 Copy of go 1.18 created version mismatch, reverting for now 2022-03-28 19:03:47 -04:00
Katrina Verey
458d48430a Debug exit 141 failure 2022-03-28 18:45:07 -04:00
Katrina Verey
6348ea9515 Improve logging for changelong builder 2022-03-28 17:54:09 -04:00
Katrina Verey
9e57ab72fc Copy newer Go into goreleaser image 2022-03-28 16:29:24 -04:00
Katrina Verey
5833f4ca80 Make Goreleaser use the tag passed to the script 2022-03-28 14:37:29 -04:00
Katrina Verey
e86c479690 Converge local and cloud gorelease scripts, improve release notes 2022-03-28 13:43:18 -04:00
Katrina Verey
7ff87ef5b9 Update release instructions for kubectl integration 2022-03-24 16:07:02 -04:00
Katrina Verey
6a7caf4192 Update release instructions to check for blockers 2022-02-02 13:37:39 -05:00
natasha41575
91ff4eefb2 Pin to kyaml v0.13.2 2022-02-01 14:41:11 -08:00
natasha41575
41917ca588 instructions for how to upgrade kustomize in kubectl 2022-01-04 17:47:47 -08:00
Katrina Verey
6ecae1ad50 Also pin patch and patchjson transformers 2021-11-11 14:30:39 -08:00