Make sure that ${HOME}/go/bin is in your $PATH.
Clone the repo, set up upstream remote, fetch tags, build the binaries and add them to your path:
# Clone your fork – command shown for HTTPS; adjust the URL if you prefer SSH
git clone `https://github.com/<your-username>/kubeflex.git`
cd kubeflex
# Add the upstream repository as a remote (adjust the URL if you prefer SSH)
git remote add upstream https://github.com/kubestellar/kubeflex.git
# Fetch all tags from upstream
git fetch upstream --tags
# Build the binaries
make build-all
# Add binaries to your path
export PATH=$(pwd)/bin:$PATH
Note: Fetching tags from upstream is important as the version information for KubeFlex binaries is derived from git tags. Without the tags, commands like
kflex init -c(which initializes KubeFlex and creates a kind cluster) will not work correctly.
To prepare a hosting cluster for testing, execute the following script. This script accomplishes several key tasks:
test/e2e/setup-kubeflex.sh
make ko-build-local-cmupdate
LATEST_TAG=<tag used for image> make ko-build-push-cmupdate
Delete branch “brew” from https://github.com/kubestellar/kubeflex if there is such a branch.
Make sure that the go-version parameter of actions/setup-go in
.github/workflows/goreleaser.yml is high enough. It is enough
that its minor version is not below the in go.mod.
git checkout main and make sure it (a) equals main in https://github.com/kubestellar/kubeflex and (b) is what you want to release.
check existing tags e.g.,
git tag
v0.1.0
v0.1.1
v0.2.0
...
v0.3.1
create a new tag e.g.
git tag v0.3.2
Push the tag upstream
git push upstream --tag v0.3.2
Wait until goreleaser completes the release process.
Invoke the E2E test workflow on the release just made (e.g, using the GitHub web UI). See if it succeeds. If not then there is a problem that needs to be remedied and a newer release made.
The goreleaser workflow will also create a branch named brew with some changes (to the homebrew install script) that need to get merged into main. Make a PR to merge brew into main, and get it approved and merged.
To avoid leaving a time bomb, delete that brew branch after it was merged into main (the goreleaser will fail to create the new brew branch if already exists).