Skip to content

Commit 0fe274a

Browse files
l0rdsleshchenko
andauthored
Changes after renaming master branch (#399)
Co-authored-by: Serhii Leshchenko <[email protected]>
1 parent 2c5cc19 commit 0fe274a

File tree

6 files changed

+22
-22
lines changed

6 files changed

+22
-22
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name: CI
22

3-
# Triggers the workflow on push or pull request events but only for the master branch
3+
# Triggers the workflow on push or pull request events but only for the main branch
44
on:
55
push:
6-
branches: [ master ]
6+
branches: [ main ]
77
pull_request:
8-
branches: [ master ]
8+
branches: [ main ]
99

1010
jobs:
1111
build-and-validate:

.github/workflows/release-typescript-models.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: types
44

55
on:
66
push:
7-
branches: [ master ]
7+
branches: [ main ]
88

99
jobs:
1010
release-typescript-models:

docs/proposals/registry/registry-structure.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Devfile Registry Structure
22
This document outlines the structure of a Devfile Registry Repository that’s used as the basis for an OCI Devfile Registry, hosted on Kubernetes. It also outlines how individual files in each stack will get pushed up to the OCI registry.
33

4-
This design proposal is a follow up to [Devfile Registry Packaging](https://github.com/devfile/api/blob/master/docs/proposals/registry/devfile-packaging.md) and I recommend reading that first.
4+
This design proposal is a follow up to [Devfile Registry Packaging](https://github.com/devfile/api/blob/main/docs/proposals/registry/devfile-packaging.md) and I recommend reading that first.
55

66
## As-is Today
77
Currently, the top-level structure of a devfile registry’s repository is unwritten, but it usually consists of a **devfiles** or **stacks** folder, and any associated files specific to that registry

docs/proposals/versioning-and-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The Devfile Kubernetes API (defined in https://github.com/devfile/api/) is the s
1414

1515
**How to Update?**
1616

17-
1) Add a new folder for the version in the [devfile/api](https://github.com/devfile/api/) repository under [pkg/apis/workspaces](https://github.com/devfile/api/tree/master/pkg/apis/workspaces). For example `pkg/apis/workspaces/v1` if bumping the K8S API version to `v1`.
17+
1) Add a new folder for the version in the [devfile/api](https://github.com/devfile/api/) repository under [pkg/apis/workspaces](https://github.com/devfile/api/tree/main/pkg/apis/workspaces). For example `pkg/apis/workspaces/v1` if bumping the K8S API version to `v1`.
1818
2) Add a schema and version in the CRD manifests
1919
3) Go through the JSON schema update process outlined below to update the JSON schema version.
2020
4) Update the devworkspace operator and devfile library to consume the Go structs in the new K8S API version, as needed.
@@ -74,7 +74,7 @@ The following steps outline the steps done to release a new version of the Devfi
7474

7575
v) A PR is opened to merge these changes into the release branch
7676

77-
vi) The schema version on the master branch is bumped and a PR is opened, provided the schema version passed in is **not** older than the master branch schema version.
77+
vi) The schema version on the main branch is bumped and a PR is opened, provided the schema version passed in is **not** older than the main branch schema version.
7878

7979
5) Once the release PR is approved and merged, the release engineer creates a new release on GitHub based off the release branch that was just created and includes the generated `devfile.json` as a release artifact.
8080
- The tag `v{major}.{minor}.{bugfix}`, where the `{major}.{minor}.{bugfix}` corresponds to the devfile schema version, is used to enable the new version of the API to be pulled in as a Go module.

make-release.sh

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ checkoutToReleaseBranch() {
6767
echo "[INFO] $BRANCH exists."
6868
resetChanges $BRANCH
6969
else
70-
echo "[INFO] $BRANCH does not exist. Will create a new one from master."
71-
resetChanges master
72-
git push origin master:$BRANCH
70+
echo "[INFO] $BRANCH does not exist. Will create a new one from main."
71+
resetChanges main
72+
git push origin main:$BRANCH
7373
fi
7474
git checkout -B $SCHEMA_VERSION
7575
}
@@ -106,8 +106,8 @@ bumpVersion() {
106106
SCHEMA_VERSION=$MAJOR.$((MINOR+1)).0-alpha
107107
}
108108

109-
updateVersionOnMaster() {
110-
# Checkout to a PR branch based on master to make our changes in
109+
updateVersionOnMain() {
110+
# Checkout to a PR branch based on main to make our changes in
111111
git checkout -b $SCHEMA_VERSION
112112

113113
# Set the schema version to the new version (with -alpha appended) and build the schemas
@@ -116,7 +116,7 @@ updateVersionOnMaster() {
116116
commitChanges "chore(post-release): bump schema version to ${SCHEMA_VERSION}"
117117
}
118118

119-
compareMasterVersion() {
119+
compareMainVersion() {
120120
# Parse the version passed in.
121121
IFS='.' read -a semver <<< "$SCHEMA_VERSION"
122122
MAJOR=${semver[0]}
@@ -147,17 +147,17 @@ run() {
147147
createReleaseBranch
148148
createPR "Release version ${SCHEMA_VERSION}"
149149

150-
# If needed, bump the schema version in master and open a PR against master
151-
# Switch back to the master branch
152-
BRANCH=master
150+
# If needed, bump the schema version in main and open a PR against main
151+
# Switch back to the main branch
152+
BRANCH=main
153153
resetChanges $BRANCH
154-
if compareMasterVersion; then
155-
echo "[INFO] Updating schema version on master to ${SCHEMA_VERSION}"
154+
if compareMainVersion; then
155+
echo "[INFO] Updating schema version on main to ${SCHEMA_VERSION}"
156156
bumpVersion
157-
updateVersionOnMaster
158-
createPR "Bump schema version on master to ${SCHEMA_VERSION}"
157+
updateVersionOnMain
158+
createPR "Bump schema version on main to ${SCHEMA_VERSION}"
159159
else
160-
echo "[WARN] The passed in schema version ${SCHEMA_VERSION} is less than the current version on master, so not updating the master branch version"
160+
echo "[WARN] The passed in schema version ${SCHEMA_VERSION} is less than the current version on main, so not updating the main branch version"
161161
exit
162162
fi
163163
}

samples/devfiles/sample-devfile.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ projects:
88
remotes:
99
origin: "https://github.com/devfile/api"
1010
checkoutFrom:
11-
revision: "master"
11+
revision: "main"
1212
remote: origin
1313
components:
1414
- name: editor

0 commit comments

Comments
 (0)