Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: create new release command #140

Open
fzipi opened this issue Mar 21, 2024 · 2 comments · May be fixed by #198
Open

Feature: create new release command #140

fzipi opened this issue Mar 21, 2024 · 2 comments · May be fixed by #198
Assignees
Labels
enhancement New feature or request

Comments

@fzipi
Copy link
Member

fzipi commented Mar 21, 2024

With the idea of automating most of the process for releasing, these steps from the release procedure might be easily automated:

Requirements

Example command: crs-toolchain release new -v v4.2.0.

This will:

  1. Create branch for release. Call it release/$version
  2. Update the copyright year and version in files
  3. Git add/commit the files?
  4. Create new PR with the branch? Add label +release
  5. Create a new branch for post-release. Call it post-release/$next-minor-version"-dev".
  6. Update the copyright year and version in files for the post release version
  7. Git add/commit the files?
  8. Create new PR with the branch? Add label +post-release
@fzipi fzipi added the enhancement New feature or request label Mar 21, 2024
@fzipi fzipi self-assigned this Mar 21, 2024
theseion added a commit that referenced this issue Jan 1, 2025
- create and check out new version branch

Fixes #140
@theseion theseion linked a pull request Jan 1, 2025 that will close this issue
@fzipi
Copy link
Member Author

fzipi commented Jan 2, 2025

Ok, forgot to add it to the issue, but maybe is too cumbersome to add a new git integration (unless we see the merit for additional things) just for this.

I'm using this script for this now:

#!/bin/bash

release=$1
year=$(date +"%Y")

if [ -z "$release" ]; then
  echo "Usage: $0 <release>"
  exit 1
fi


git checkout main
git pull
git checkout -b release/v$release
crs-toolchain chore update-copyright -y $date -v $release
git checkout -- util/crs-rules-check/examples/*
git add rules/*.conf
git add rules/*.conf.example
git add crs-setup.conf.example
git commit -m "chore: release v$release"
gh pr create --title "chore: release v$release" \
    --body "Signed-off-by: Felipe Zipitria <[email protected]>" \
    --base main --label "release:ignore" \
    --reviewer "coreruleset/core-developers"

theseion added a commit that referenced this issue Jan 3, 2025
- create and check out new version branch

Fixes #140
@theseion
Copy link
Collaborator

theseion commented Jan 3, 2025

Added the missing stuff from your script to the PR.

theseion added a commit that referenced this issue Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants