Skip to content

Commit 00eb49f

Browse files
authored
Merge pull request #218 from myakove/rename-master-branch-to-main
Rename master branch to main
2 parents 6fa10f3 + 041a896 commit 00eb49f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ gh auth login # Follow login instructions
2626
sudo npm install github-release-notes -g
2727
```
2828
* export GREN_GITHUB_TOKEN=< TOKEN >
29-
* Run ./scripts/release.sh providing source branch and target version (must be executed from master branch)
29+
* Run ./scripts/release.sh providing source branch and target version (must be executed from main branch)
3030
### usage:
3131
```bash
32-
./scripts/release.sh master v1.5.5
32+
./scripts/release.sh main v1.5.5
3333
```
3434

3535
## docs

scripts/release.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

3-
# Usage: ./scripts/release.sh master v1.5.3
4-
# Run from master branch
3+
# Usage: ./scripts/release.sh main v1.5.3
4+
# Run from main branch
55

66
set -e
77

@@ -10,7 +10,7 @@ BASE_SOURCE_BRANCH="$1"
1010
VERSION="$2"
1111
STRIPPED_VERSION="${VERSION//v/}"
1212
REMOTE_ORIGIN=$(grep -A3 '\[remote "origin"\]' .git/config)
13-
MASTER_BRANCH="master"
13+
main_BRANCH="main"
1414
TARGET_BRANCH="branch-$VERSION" # New branch for the release; formatted: branch-vx.y.z[.i]
1515

1616
if [[ $REMOTE_ORIGIN != *"github.com:RedHatQE/openshift-python-wrapper"* ]]; then
@@ -23,8 +23,8 @@ if [[ -z "${GREN_GITHUB_TOKEN}" ]]; then
2323
exit 1
2424
fi
2525

26-
if [[ $(git branch --show-current) != "$MASTER_BRANCH" ]]; then
27-
echo "Script must be executed from master branch"
26+
if [[ $(git branch --show-current) != "$main_BRANCH" ]]; then
27+
echo "Script must be executed from main branch"
2828
exit 1
2929
fi
3030

@@ -69,4 +69,4 @@ git commit -am "Update changelog for version $VERSION"
6969
git push -f origin "$TARGET_BRANCH"
7070

7171
git pull origin "$TARGET_BRANCH"
72-
git checkout "$MASTER_BRANCH"
72+
git checkout "$main_BRANCH"

0 commit comments

Comments
 (0)