Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ builds:
# plugin builds
- id: "kubectl-kcp"
main: ./cmd/kubectl-kcp
dir: cli
dir: staging/src/github.com/kcp-dev/cli
binary: bin/kubectl-kcp
ldflags:
- "{{ .Env.LDFLAGS }}"
Expand All @@ -34,7 +34,7 @@ builds:

- id: "kubectl-ws"
main: ./cmd/kubectl-ws
dir: cli
dir: staging/src/github.com/kcp-dev/cli
binary: bin/kubectl-ws
ldflags:
- "{{ .Env.LDFLAGS }}"
Expand All @@ -50,7 +50,7 @@ builds:

- id: "kubectl-create-workspace"
main: ./cmd/kubectl-create-workspace
dir: cli
dir: staging/src/github.com/kcp-dev/cli
binary: bin/kubectl-create-workspace
ldflags:
- "{{ .Env.LDFLAGS }}"
Expand All @@ -66,7 +66,7 @@ builds:

- id: apigen
main: ./cmd/apigen
dir: sdk
dir: staging/src/github.com/kcp-dev/sdk
binary: bin/apigen
ldflags:
- "{{ .Env.LDFLAGS }}"
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ ENV GOPROXY=$goproxy
# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum
COPY cli/go.mod cli/go.mod
COPY cli/go.sum cli/go.sum
COPY staging/src/github.com/kcp-dev/apimachinery/go.mod staging/src/github.com/kcp-dev/apimachinery/go.mod
COPY staging/src/github.com/kcp-dev/apimachinery/go.sum staging/src/github.com/kcp-dev/apimachinery/go.sum
COPY staging/src/github.com/kcp-dev/cli/go.mod staging/src/github.com/kcp-dev/cli/go.mod
COPY staging/src/github.com/kcp-dev/cli/go.sum staging/src/github.com/kcp-dev/cli/go.sum
COPY staging/src/github.com/kcp-dev/client-go/go.mod staging/src/github.com/kcp-dev/client-go/go.mod
COPY staging/src/github.com/kcp-dev/client-go/go.sum staging/src/github.com/kcp-dev/client-go/go.sum
COPY staging/src/github.com/kcp-dev/code-generator/go.mod staging/src/github.com/kcp-dev/code-generator/go.mod
Expand Down
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@ Shards in kcp represent a single apiserver and etcd/db instance. This is how kc

## Where can I get the kubectl ws plugin?

You're in the right place. Clone this repo and run `make install WHAT=./cli/cmd/kubectl-kcp`.
You're in the right place. Clone this repo and run `make install WHAT=./staging/src/github.com/kcp-dev/cli/cmd/kubectl-kcp`.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ldflags:
require-%:
@if ! command -v $* 1> /dev/null 2>&1; then echo "$* not found in ${PATH}"; exit 1; fi

build: WHAT ?= ./cmd/... ./cli/cmd/... ./staging/src/github.com/kcp-dev/sdk/cmd/...
build: WHAT ?= ./cmd/... ./staging/src/github.com/kcp-dev/cli/cmd/... ./staging/src/github.com/kcp-dev/sdk/cmd/...
build: require-jq require-go require-git verify-go-versions ## Build the project
set -x; for W in $(WHAT); do \
pushd . && cd $${W%..}; \
Expand All @@ -119,7 +119,7 @@ build: require-jq require-go require-git verify-go-versions ## Build the project
build-all:
GOOS=$(OS) GOARCH=$(ARCH) $(MAKE) build WHAT='./cmd/...'

install: WHAT ?= ./cmd/... ./cli/cmd/... ./staging/src/github.com/kcp-dev/sdk/cmd/...
install: WHAT ?= ./cmd/... ./staging/src/github.com/kcp-dev/cli/cmd/... ./staging/src/github.com/kcp-dev/sdk/cmd/...
install: require-jq require-go require-git verify-go-versions ## Install the project
set -x; for W in $(WHAT); do \
pushd . && cd $${W%..}; \
Expand Down
27 changes: 7 additions & 20 deletions docs/content/contributing/guides/publishing-a-new-kcp-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ description: >
2. <https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account>
3. <https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key>

### Create the Tags
### Create the Tag

kcp has 2 go modules, and a unique tag is needed for each module every time we create a new release.
!!! note
kcp used two have two submodules (`sdk` and `cli`) which were tagged separately in addition to the main kcp module.
With the introduction of the monorepo, those two submodules became staging repositories. Their tags are now handled
automatically by publishing-bot, so it's only needed to create one tag for the main kcp module.

1. `git fetch` from the main kcp repository (kcp-dev/kcp) to ensure you have the latest commits
2. Tag the main module
Expand All @@ -33,28 +36,12 @@ kcp has 2 go modules, and a unique tag is needed for each module every time we c
git tag --sign --message "$TAG" "$TAG" "$REF"
```

3. Tag the `sdk` module, following the same logic as above for `REF` and `TAG`

```shell
REF=upstream/main
TAG=v1.2.3
git tag --sign --message "sdk/$TAG" "sdk/$TAG" "$REF"
```

4. Tag the `cli` module, following the same logic as above for `REF` and `TAG`

```shell
REF=upstream/main
TAG=v1.2.3
git tag --sign --message "cli/$TAG" "cli/$TAG" "$REF"
```

### Push the Tags
### Push the Tag

```shell
REMOTE=upstream
TAG=v1.2.3
git push "$REMOTE" "$TAG" "sdk/$TAG" "cli/$TAG"
git push "$REMOTE" "$TAG"
```

## If it's a New Minor Version
Expand Down
4 changes: 2 additions & 2 deletions docs/generators/cli-doc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ go 1.24.0

require (
github.com/kcp-dev/kcp v0.0.0-00010101000000-000000000000
github.com/kcp-dev/kcp/cli v0.0.0-00010101000000-000000000000
github.com/kcp-dev/cli v0.0.0-00010101000000-000000000000
github.com/spf13/cobra v1.9.1
)

replace (
github.com/charmbracelet/colorprofile => github.com/charmbracelet/colorprofile v0.2.2
github.com/charmbracelet/x/ansi => github.com/charmbracelet/x/ansi v0.8.0
github.com/kcp-dev/cli => ../../../staging/src/github.com/kcp-dev/cli
github.com/kcp-dev/kcp => ../../../
github.com/kcp-dev/kcp/cli => ../../../cli
github.com/kcp-dev/sdk => ../../../staging/src/github.com/kcp-dev/sdk
)

Expand Down
7 changes: 4 additions & 3 deletions docs/generators/cli-doc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ import (

"github.com/spf13/cobra"

kubectlCreateWorkspace "github.com/kcp-dev/kcp/cli/cmd/kubectl-create-workspace/cmd"
kubectlKcp "github.com/kcp-dev/kcp/cli/cmd/kubectl-kcp/cmd"
kubectlWs "github.com/kcp-dev/kcp/cli/cmd/kubectl-ws/cmd"
kubectlCreateWorkspace "github.com/kcp-dev/cli/cmd/kubectl-create-workspace/cmd"
kubectlKcp "github.com/kcp-dev/cli/cmd/kubectl-kcp/cmd"
kubectlWs "github.com/kcp-dev/cli/cmd/kubectl-ws/cmd"

"github.com/kcp-dev/kcp/hack/third_party/github.com/spf13/cobra/doc"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!--

⚠️ This is an automatically published staged repository for kcp. ⚠️

Contributions, including issues and pull requests, should be made to the main kcp repository:
https://github.com/kcp-dev/kcp

This repository is read-only for importing, and not used for direct contributions.

See the monorepo structure document for more details:
https://docs.kcp.io/kcp/main/contributing/monorepo/

-->
13 changes: 13 additions & 0 deletions staging/src/github.com/kcp-dev/cli/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Contributing

cli is [Apache 2.0 licensed](LICENSE), and we accept contributions via
GitHub pull requests.

Please read the following guide if you're interested in contributing.

## Certificate of Origin

By contributing to this project you agree to the Developer Certificate of
Origin (DCO). This document was created by the Linux Kernel community and is a
simple statement that you, as a contributor, have the legal right to make the
contribution. See the [DCO](DCO) file for details.
34 changes: 34 additions & 0 deletions staging/src/github.com/kcp-dev/cli/DCO
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
Loading