diff --git a/docs/releases.md b/docs/releases.md index 8b6ab8105..3a3451b54 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -12,7 +12,49 @@ A Conduit release has the following parts: - a GitHub package, which is the official Docker image for Conduit. It's available on GitHub's Container Registry. The latest Docker image which is not a nightly is tagged with `latest`. -## How to release a new version +## Before a release + +### Update dependencies + +Dependencies should be updated in the order described below. The instructions +assume that this repository and the other Conduit repositories are all cloned in +the same directory. + +1. [`conduit-commons`](https://github.com/ConduitIO/conduit-commons) + - Run `scripts/get-compare-link.sh ../conduit-commons/` to compare the latest tag and the `main` branch. + - If the changes should be released/tagged, push a new tag. +2. [`conduit-connector-protocol`](https://github.com/conduitio/conduit-connector-protocol) + - Update `conduit-commons` if needed: `go get github.com/conduitio/conduit-commons@vX.Y.Z` + - Run `scripts/get-compare-link.sh ../conduit-connector-protocol/` to compare the latest tag and the `main` branch. + - If the changes should be released/tagged, push a new tag. +3. [`conduit-connector-sdk`](https://github.com/ConduitIO/conduit-connector-sdk) + - Update `conduit-commons` if needed: `go get github.com/conduitio/conduit-commons@vX.Y.Z` + - Update `conduit-connector-protocol` if needed: `go get github.com/conduitio/conduit-connector-protocol@vX.Y.Z` + - Run `scripts/get-compare-link.sh ../conduit-connector-sdk/` to compare the latest tag and the `main` branch. + - If the changes should be released/tagged, push a new tag. +4. [`conduit-processor-sdk`](https://github.com/ConduitIO/conduit-processor-sdk) + - Update `conduit-commons` if needed: `go get github.com/conduitio/conduit-commons@vX.Y.Z` + - Run `scripts/get-compare-link.sh ../conduit-processor-sdk/` to compare the latest tag and the `main` branch. + - If the changes should be released/tagged, push a new tag. +5. Bump the Connector SDK in all the built-in connectors: `scripts/bump-sdk-in-connectors.sh vX.Y.Z` +6. For each of the built-in connectors (file, kafka, generator, s3, postgres, log): + - Run `scripts/get-compare-link.sh ../conduit-processor-sdk/` to compare the latest tag and the `main` branch. + - If the changes should be released/tagged, push a new tag. +7. Bump the built-in connectors: `scripts/bump-builtin-connectors.sh` +8. Conduit itself + - Update `conduit-connector-sdk` if needed + - Update `conduit-processor-sdk` if needed + - Update `conduit-connector-protocol` if needed + - Update `conduit-commons` if needed + - Release Conduit (see instructions below) + +## Documentation + +1. Write a blog post. +2. Regenerate processor documentation on [`conduit-site`](https://github.com/ConduitIO/conduit-site). +3. Update banner on the web-site ([example](https://github.com/ConduitIO/conduit-site/pull/47/files#diff-cc8abb6104e21d495dc8f64639c7b03419226d920d1c545df51be9b0b73b2784)). + +## Releasing Conduit A release is triggered by pushing a new tag which starts with `v` (for example `v1.2.3`). Everything else is then handled by GoReleaser and GitHub actions. To push a new tag, please use the script [scripts/tag.sh](https://github.com/ConduitIO/conduit/blob/main/scripts/tag.sh), diff --git a/scripts/bump-sdk-in-connectors.sh b/scripts/bump-sdk-in-connectors.sh index 108a4bb8a..0d55dd303 100755 --- a/scripts/bump-sdk-in-connectors.sh +++ b/scripts/bump-sdk-in-connectors.sh @@ -19,7 +19,7 @@ SDK_V=$1 for conn in 'file' 'kafka' 'generator' 's3' 'postgres' 'log' do - cd ../conduit-connector-$conn + cd ../conduit-connector-$conn || exit echo echo "Working on conduit-connector-$conn" @@ -36,5 +36,5 @@ do gh pr create --fill --head bump-sdk-version-$SDK_V - cd ../conduit + cd ../conduit || exit done diff --git a/scripts/get-compare-link.sh b/scripts/get-compare-link.sh new file mode 100755 index 000000000..5fdaccccf --- /dev/null +++ b/scripts/get-compare-link.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +# Check if the correct number of arguments are provided +if [ "$#" -ne 1 ]; then + echo "Usage: $0 " + exit 1 +fi + +# Move into the repository directory +cd "$1" || { echo "Failed to move into repository directory"; exit 1; } + +# Fetch tags +git fetch --tags || { echo "Failed to fetch tags"; exit 1; } + +# Get the latest tag across all branches +latest_tag=$(git describe --tags "$(git rev-list --tags --max-count=1)") || { echo "Failed to get latest tag"; exit 1; } + +# Get the owner and repository name from the remote URL +repo_url=$(git config --get remote.origin.url) +IFS='/' read -ra parts <<< "$repo_url" +owner="${parts[-2]}" +repo="${parts[-1]%.git}" # Remove the .git extension if it exists + +# Create a link to compare the latest tag and the main branch +comparison_link="https://github.com/$owner/$repo/compare/$latest_tag...main" + +echo "Comparison Link: $comparison_link"