diff --git a/.circleci/config.yml b/.circleci/config.yml index f64f39df..ac9ece40 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,7 +33,7 @@ commands: - run: name: Output BUILD_VERSION env var based on recent git tag and type of build command: | - BUILD_VERSION=$(git describe --tags --match 'v*.*.*' --exclude '*feature'); + BUILD_VERSION=$(git describe --tags --match 'v*.*.*'); echo "git tag-based BUILD_VERSION: $BUILD_VERSION" if [[ "<< parameters.release_ref >>" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then # if release tag starts with semver, then this is either a prod or feature build. use the release tag, then, as build version too. @@ -470,12 +470,10 @@ jobs: export JOB_PARAMS=$( jq -n \ --arg j S3_UPLOAD \ - --arg ct "$CIRCLE_TAG" \ - --arg cs "$CIRCLE_SHA1" \ --arg ad << parameters.artifact_dir >> \ --arg p << parameters.s3-target-path >> \ --arg fn << parameters.file-name >> \ - '{JOB_NAME: $j, ARTIFACTS_DIR: $ad, CIRCLE_TAG: $ct, CIRCLE_SHA1: $cs, S3_TARGET_PATH: $p, FILE_NAME: $fn}' + '{JOB_NAME: $j, ARTIFACTS_DIR: $ad, S3_TARGET_PATH: $p, FILE_NAME: $fn}' ) if [ -n "${CIRCLE_TAG}" ]; then export GIT_REF=$CIRCLE_TAG; else export GIT_REF=$CIRCLE_BRANCH; fi sudo /Library/circleci/runner-entrypoint.sh $GIT_REF "$JOB_PARAMS" diff --git a/.github/MAINTAINERS_GUIDE.md b/.github/MAINTAINERS_GUIDE.md index 6d165e2a..ab015dc4 100644 --- a/.github/MAINTAINERS_GUIDE.md +++ b/.github/MAINTAINERS_GUIDE.md @@ -10,7 +10,7 @@ guide is **not** for you. You can of course keep reading though. - [Tools](#tools): the development tooling for this codebase - [Project layout](#project-layout): an overview of project directories - [Tasks](#tasks): common things done during development -- [Development build](#development-build): for releases with the latest changes +- [Releases](#releases): when releasing the latest changes - [Workflow](#workflow): around changes and contributions - [Everything else](#everything-else): and all of those other things @@ -622,14 +622,22 @@ Slack CLI: - slack.com - slackb.com -## Development build +## Releases + +On regular occasion and a recurring schedule the latest changes are tagged for +release. + +- [Development build](#development-build) +- [Feature tag](#feature-tags) + +### Development build The development build comes in 2 flavours: 1. Development build GitHub release 2. Development build install script -### 1. Development build GitHub release +#### 1. Development build GitHub release A development build and recent changelog is generated each night from `main` with all of the latest changes. Builds are released with the `dev-build` tag and @@ -646,7 +654,7 @@ Each release page contains: The development build and release automation is performed from the `deploy-dev` job in the [`.circleci/config.yml`][circleci] file. -### 2. Development build install script +#### 2. Development build install script An installation script for the development build provides the same `dev-build` release tag but with magic setup: @@ -659,6 +667,24 @@ Changes to the actual installation scripts are made through other channels and might become outdated between releases. These scripts can still be found in the [`scripts/`][scripts] directory in the meantime. +### Feature tags + +Unreleased changes that haven't landed on `main` can be shared and installed +using feature tags. + +Create a new tag in the following format on a branch of a pull request: + +```bash +git tag v3.4.5-[example-branch-name]-feature # Replace with the branch +git push origin v3.4.5-feat-something-feature # Start the build on push +``` + +After a few minutes these changes can be installed using the install script: + +```bash +curl -fsSL https://downloads.slack-edge.com/slack-cli/install-dev.sh | bash -s -- -v 3.4.5-feat-something-feature +``` + ## Workflow ### Fork diff --git a/.github/workflows/delete-pr-build-on-close.yml b/.github/workflows/delete-pr-build-on-close.yml index 2524534d..0834ad35 100644 --- a/.github/workflows/delete-pr-build-on-close.yml +++ b/.github/workflows/delete-pr-build-on-close.yml @@ -65,6 +65,18 @@ jobs: echo "Failed to find $TAG_NAME, trying next..." fi sleep 1 + + FEATURE_TAG_NAME="${TAGS}-${REF}-feature" + echo "Identified feature-release tagname as 🔪: $FEATURE_TAG_NAME" + + # Delete a feature-release + if GH_DEBUG=1 gh release --repo="slackapi/slack-cli" delete "$FEATURE_TAG_NAME" -y --cleanup-tag; then + echo "Successfully deleted $FEATURE_TAG_NAME" + RELEASE_FOUND=0 + else + echo "Failed to find $FEATURE_TAG_NAME, trying next..." + fi + sleep 1 done if [ "$RELEASE_FOUND" -ne 0 ]; then echo "No matching pre-releases tag was found for the branch $TAG_NAME in recent versions"