Skip to content

Commit

Permalink
docs: add reference to update_init_branches.sh (#7)
Browse files Browse the repository at this point in the history
# Description

Add a `.github/update_init_branches.sh` to update the init branches
automatically.

# Verification

Script manually executed.
  • Loading branch information
kayman-mk authored May 14, 2024
1 parent 4bdeee9 commit c10e699
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/update_init_branches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -euo pipefail

#
# This script rebases all init branches on the main branch.
#

git checkout main
git pull

# for all init branches
for branch in $(git branch --list "init-*"); do
git checkout "$branch"
git merge main
git push
done
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,26 @@ Template repository for Maven projects. Don't forget to update the README.md fil
run

```shell
.github/update_workflows.sh
git checkout main
.github/update_templates.sh

# strongly suggested!
pre-commit install -c .github/pre-commit-config.yaml
```

In case a major release is published on the Workflow-Template repository, run `.github/update_workflows.sh`. This creates a PR
with the changes in the workflows. Carefully check the changes and merge them into the `main` branch.

## Development

### Usage

This repository is used as a template repository for new Maven projects. Thus the newly created repository will have the same
structure and configurations as this one.

After merging into the `main` branch, use `.github/update_init_branches.sh` to merge these changes into the `init-` branches as
well.

### `init-` branches

The `init-` branches are used to initialize the project with the necessary files and configurations. Create them in this repository
Expand Down

0 comments on commit c10e699

Please sign in to comment.