From c2c5daf61a89cae068933c0054d05ae065f08f38 Mon Sep 17 00:00:00 2001 From: Aaron Schlesinger <70865+arschles@users.noreply.github.com> Date: Mon, 15 Jun 2020 13:44:37 -0700 Subject: [PATCH] Switching to using the main default branch (#1628) * Switching to using the main default branch * changing links to main branch, not master branch * Changing a few links to relative * Bumping chart version Co-authored-by: Marwan Sulaiman --- .drone.yml | 8 +++--- DEVELOPMENT.md | 26 +++++++++---------- REVIEWS.md | 2 +- charts/athens-proxy/Chart.yaml | 4 +-- charts/athens-proxy/README.md | 2 +- docs/content/configuration/_index.md | 2 +- docs/content/configuration/storage.md | 2 +- docs/content/contributing/_index.md | 2 +- .../contributing/community/philosophy.md | 2 +- .../contributing/community/triaging.md | 2 +- .../contributing/maintainers/first-issues.md | 4 +-- docs/content/contributing/new/development.md | 2 +- docs/content/contributing/new/docs.md | 2 +- docs/content/contributing/new/git.md | 6 ++--- docs/content/contributing/new/github.md | 6 ++--- docs/content/install/install-on-kubernetes.md | 2 +- .../install/install-on-kubernetes.zh.md | 2 +- docs/content/install/using-docker.md | 4 +-- docs/content/intro/why.md | 2 +- docs/content/intro/why.zh.md | 2 +- scripts/check_conflicts.sh | 6 ++--- scripts/check_deps.sh | 4 +-- scripts/ps/check_deps.ps1 | 4 +-- scripts/push-docker-images.sh | 4 +-- test/ct.yaml | 2 +- 25 files changed, 50 insertions(+), 54 deletions(-) diff --git a/.drone.yml b/.drone.yml index f977eea1..323a6a18 100644 --- a/.drone.yml +++ b/.drone.yml @@ -61,7 +61,7 @@ steps: from_secret: ATHENS_AZURE_ACCOUNT_KEY when: branch: - - master + - main event: - push - pull_request @@ -84,7 +84,7 @@ steps: - VERSION=${DRONE_COMMIT} when: branch: - - master + - main event: - push @@ -103,7 +103,7 @@ steps: - VERSION=${DRONE_COMMIT} when: branch: - - master + - main event: - push @@ -135,7 +135,7 @@ steps: from_secret: AZURE_STORAGE_CONNECTION_STRING when: branch: - - master + - main event: - push diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 230cec35..e863cf2b 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -256,7 +256,7 @@ If there are significant new features in this release, choose to update `x` and ## Code freeze -The first step to a release is a code freeze. This is 1-2 weeks (depending on the features and bugfixes we intend to release) during which we don't merge anything but critical bugfixes to the `master` branch. The code in `master` is essentially a release candidate (we don't cut a new branch for RC's at the moment) to test. +The first step to a release is a code freeze. This is 1-2 weeks (depending on the features and bugfixes we intend to release) during which we don't merge anything but critical bugfixes to the `main` branch. The code in `main` is essentially a release candidate (we don't cut a new branch for RC's at the moment) to test. >If you are doing a patch release, you do not need to do a code freeze. @@ -272,27 +272,27 @@ You'll need to have permissions to create a new branch in origin, whether throug If you're doing a minor release, you'll be incrementing `x` and setting `y` to 0 in the branch name. For example, if the previous release was `v0.1.2`, the previous release branch will be `release-v0.1.2`. Your new version will be `v0.2.0` and new release branch will be `release-v0.2.0`. -Cut minor release branches from the `master` branch. +Cut minor release branches from the `main` branch. ### Patch releases If you're doing a patch release, you'll be incrementing only the `y` version number. In this case, the new version will be `v0.2.1` and new branch will be `release-v0.2.1`. -Cut patch release branches from the most recent release branch. Since these branches will only fix bugs, you'll need to find the commits from `master` that have the fixes in them and cherry pick them into the new patch release branch. For example: +Cut patch release branches from the most recent release branch. Since these branches will only fix bugs, you'll need to find the commits from `main` that have the fixes in them and cherry pick them into the new patch release branch. For example: ```console $ git checkout -b release-v0.2.1 upstream/release-v0.2.0 -$ git cherry-pick +$ git cherry-pick .... ``` ### Updating the helm chart -Regardless of which branch you created, you'll need to update the helm chart number. After you've cut the branch, make sure to change the versions in the [`Chart.yaml`](https://github.com/gomods/athens/blob/master/charts/athens-proxy/Chart.yaml) file: +Regardless of which branch you created, you'll need to update the helm chart number. After you've cut the branch, make sure to change the versions in the [`Chart.yaml`](./charts/athens-proxy/Chart.yaml) file: -- If this is a new release of Athens, make sure to update the Docker image version [value](https://github.com/twexler/athens/blob/master/charts/athens-proxy/values.yaml#L5) -- Increment the patch number in the [`version` field](https://github.com/gomods/athens/blob/master/charts/athens-proxy/Chart.yaml#L2) -- Set the [`appVersion` field](https://github.com/gomods/athens/blob/master/charts/athens-proxy/Chart.yaml#L2) to the semver of the new branch. Do not include the `v` prefix +- If this is a new release of Athens, make sure to update the Docker image version [value](./charts/athens-proxy/values.yaml#L5) +- Increment the patch number in the [`version` field](./charts/athens-proxy/Chart.yaml#L2) +- Set the [`appVersion` field](./charts/athens-proxy/Chart.yaml#L2) to the semver of the new branch. Do not include the `v` prefix ## Creating the new release in GitHub @@ -311,17 +311,17 @@ Make sure the Drone CI/CD job finished, and check in Docker Hub to make sure the The Drone job will do everything except: - Tweet out about the new release -- Update the helm chart in the `master` branch +- Update the helm chart in the `main` branch If you are a core maintainer and don't have access to the `@gomods` account, ask one of the maintainers to give you access. [Here](https://twitter.com/gomodsio/status/1240016379962691585) is an example showing the general format of these tweets. Obviously you should use your creativity here though! -Finally, you'll need to update the helm version number in the `master` branch. Create a new branch called `update-helm-$CURRENT_TAG` and update the following files: +Finally, you'll need to update the helm version number in the `main` branch. Create a new branch called `update-helm-$CURRENT_TAG` and update the following files: -- [charts/athens-proxy/values.yaml](https://github.com/gomods/athens/blob/master/charts/athens-proxy/values.yaml) - update the `image.tag` field to the latest version number you created, including the `v`. This field should be near the top of the file -- [charts/athens-proxy/Chart.yaml](https://github.com/gomods/athens/blob/master/charts/athens-proxy/Chart.yaml) - update the `version` field and the `appVersion` field +- [charts/athens-proxy/values.yaml](./charts/athens-proxy/values.yaml) - update the `image.tag` field to the latest version number you created, including the `v`. This field should be near the top of the file +- [charts/athens-proxy/Chart.yaml](./charts/athens-proxy/Chart.yaml) - update the `version` field and the `appVersion` field - Increment the patch number in the `version` field - Change the `appVersion` field to the tag name of the GitHub version you created, including the `v` [Here](https://github.com/gomods/athens/pull/1574) is an example of how to do this. -Finally, create a pull request from your new branch into the `master` branch. It will be reviewed and merged as soon as possible. +Finally, create a pull request from your new branch into the `main` branch. It will be reviewed and merged as soon as possible. diff --git a/REVIEWS.md b/REVIEWS.md index 08047196..7518db56 100644 --- a/REVIEWS.md +++ b/REVIEWS.md @@ -75,4 +75,4 @@ responded to questions, etc...) before you merge. This one is the easiest. When you decide to submit your review, please use `Approve` if everything looks good. If nobody else has any `Request Changes` or `Comment` reviews (GitHub will show a red "X" near their name if they do), you can click the "Squash and Merge" -button to merge their PR into the master branch! +button to merge their PR into the `main` branch! diff --git a/charts/athens-proxy/Chart.yaml b/charts/athens-proxy/Chart.yaml index 47616d24..48d54593 100644 --- a/charts/athens-proxy/Chart.yaml +++ b/charts/athens-proxy/Chart.yaml @@ -1,8 +1,8 @@ name: athens-proxy -version: 0.4.11 +version: 0.4.12 appVersion: 0.9.0 description: The proxy server for Go modules -icon: https://raw.githubusercontent.com/gomods/athens/master/docs/static/banner.png +icon: https://raw.githubusercontent.com/gomods/athens/main/docs/static/banner.png keywords: - Golang - Package Management diff --git a/charts/athens-proxy/README.md b/charts/athens-proxy/README.md index b123f8e1..032df14a 100644 --- a/charts/athens-proxy/README.md +++ b/charts/athens-proxy/README.md @@ -50,7 +50,7 @@ Available options: ### Pass extra configuration environment variables -You can pass any extra environment variables supported in [config.dev.toml](https://github.com/gomods/athens/blob/master/config.dev.toml). +You can pass any extra environment variables supported in [config.dev.toml](../../../config.dev.toml). The example below shows how to set username/password for basic auth: ```yaml diff --git a/docs/content/configuration/_index.md b/docs/content/configuration/_index.md index e1ffccd8..9dd6bb4d 100644 --- a/docs/content/configuration/_index.md +++ b/docs/content/configuration/_index.md @@ -7,7 +7,7 @@ weight: 3 ## Configuring Athens Here we'll cover how to configure the Athens application utilizing various configuration scenarios. ->This section covers some of the more commonly used configuration variables, but there are more! If you want to see all the configuration variables you can set, we've documented them all in [this configuration file](https://github.com/gomods/athens/blob/master/config.dev.toml). +>This section covers some of the more commonly used configuration variables, but there are more! If you want to see all the configuration variables you can set, we've documented them all in [this configuration file](https://github.com/gomods/athens/blob/main/config.dev.toml). ### Authentication There are numerous version control systems available to us as developers. In this section we'll outline how they can be used by supplying required credentials in various formats for the Athens project. diff --git a/docs/content/configuration/storage.md b/docs/content/configuration/storage.md index 797ded00..177fe23f 100644 --- a/docs/content/configuration/storage.md +++ b/docs/content/configuration/storage.md @@ -341,7 +341,7 @@ It assumes that you already have the following: ## External Storage External storage lets Athens connect to your own implementation of a storage backend. -All you have to do is implement the (storage.Backend)[https://github.com/gomods/athens/blob/master/pkg/storage/backend.go#L4] interface and run it behind an http server. +All you have to do is implement the (storage.Backend)[https://github.com/gomods/athens/blob/main/pkg/storage/backend.go#L4] interface and run it behind an http server. Once you implement the backend server, you must then configure Athens to use that storage backend as such: diff --git a/docs/content/contributing/_index.md b/docs/content/contributing/_index.md index 920eb36d..4ca508d9 100644 --- a/docs/content/contributing/_index.md +++ b/docs/content/contributing/_index.md @@ -7,7 +7,7 @@ weight: 4 Welcome, Gopher! We're really glad you're considering contributing to Athens. We'd like to briefly introduce you to our community before you get started. -We have some hard-and-fast rules in our community, like our [Code of Conduct](https://github.com/gomods/athens/blob/master/CODE_OF_CONDUCT.md), but instead of making rules pre-emptively, we try to keep in mind a shared philosophy to help us all make decisions and make new rules when we need to. +We have some hard-and-fast rules in our community, like our [Code of Conduct](https://github.com/gomods/athens/blob/main/CODE_OF_CONDUCT.md), but instead of making rules pre-emptively, we try to keep in mind a shared philosophy to help us all make decisions and make new rules when we need to. ## Our Philosophy Document diff --git a/docs/content/contributing/community/philosophy.md b/docs/content/contributing/community/philosophy.md index ab693819..0e9d4f4d 100644 --- a/docs/content/contributing/community/philosophy.md +++ b/docs/content/contributing/community/philosophy.md @@ -7,7 +7,7 @@ weight: 2 This document lays out generally how we want to work with each other. It's hard to make a rule or set a guideline for each and every situation that might come up in our community. That's basically predicting the future! -We do of course set some boundaries like the [code of conduct](https://github.com/gomods/athens/blob/master/CODE_OF_CONDUCT.md), but we want to fall back to this document for guidance when we encounter a new situation or question that we need to address. +We do of course set some boundaries like the [code of conduct](https://github.com/gomods/athens/blob/main/CODE_OF_CONDUCT.md), but we want to fall back to this document for guidance when we encounter a new situation or question that we need to address. # Guiding Principles diff --git a/docs/content/contributing/community/triaging.md b/docs/content/contributing/community/triaging.md index 11bb47be..08bcf4bb 100644 --- a/docs/content/contributing/community/triaging.md +++ b/docs/content/contributing/community/triaging.md @@ -67,4 +67,4 @@ If any of this doesn't make sense, please contact us in the `#athens` channel in Probably, yes! But we don't know if there are exact criteria on when PRs should be "prompted" and how a bot should do that. Maybe we'll learn those criteria here. -Even still, it's nice to have a human touch as a submitter and reviewer. It matches our [philosophy](https://github.com/gomods/athens/blob/master/PHILOSOPHY.md) very well. +Even still, it's nice to have a human touch as a submitter and reviewer. It matches our [philosophy](https://github.com/gomods/athens/blob/main/PHILOSOPHY.md) very well. diff --git a/docs/content/contributing/maintainers/first-issues.md b/docs/content/contributing/maintainers/first-issues.md index efa5ec92..15fb8566 100644 --- a/docs/content/contributing/maintainers/first-issues.md +++ b/docs/content/contributing/maintainers/first-issues.md @@ -20,8 +20,8 @@ request in The Athens Project. --- -Generally we will still want to try and follow the issue template for [bugs](https://github.com/gomods/athens/blob/master/.github/ISSUE_TEMPLATE/bug_report.md) or -[features](https://github.com/gomods/athens/blob/master/.github/ISSUE_TEMPLATE/feature_request.md). If you are performing issue triage you may need to add more +Generally we will still want to try and follow the issue template for [bugs](https://github.com/gomods/athens/blob/main/.github/ISSUE_TEMPLATE/bug_report.md) or +[features](https://github.com/gomods/athens/blob/main/.github/ISSUE_TEMPLATE/feature_request.md). If you are performing issue triage you may need to add more information to fulfill the below template. ## Template diff --git a/docs/content/contributing/new/development.md b/docs/content/contributing/new/development.md index a5ab97bc..ffe223f9 100644 --- a/docs/content/contributing/new/development.md +++ b/docs/content/contributing/new/development.md @@ -9,7 +9,7 @@ The proxy is written in idiomatic Go and uses standard tools. If you know Go, yo Athens uses [Go Modules](https://golang.org/cmd/go/#hdr-Modules__module_versions__and_more) for dependency management. You will need [Go v1.12+](https://golang.org/dl) to get started on Athens. -See our [Contributing Guide](https://github.com/gomods/athens/blob/master/CONTRIBUTING.md) for tips on how to submit a pull request when you are ready. +See our [Contributing Guide](https://github.com/gomods/athens/blob/main/CONTRIBUTING.md) for tips on how to submit a pull request when you are ready. ### Go version Athens is developed on Go v1.12+. diff --git a/docs/content/contributing/new/docs.md b/docs/content/contributing/new/docs.md index 717f7b53..edbedd05 100644 --- a/docs/content/contributing/new/docs.md +++ b/docs/content/contributing/new/docs.md @@ -16,4 +16,4 @@ Contributing to docs is just as important, if not more important than, writing c The Hugo server will run on http://localhost:1313 and it will automatically watch your files and update the website every time you make a change. -Alternatively you can run our custom docker image as outlined [here](https://github.com/gomods/athens/blob/master/DEVELOPMENT.md#run-the-docs) \ No newline at end of file +Alternatively you can run our custom docker image as outlined [here](./DEVELOPMENT.md#run-the-docs) \ No newline at end of file diff --git a/docs/content/contributing/new/git.md b/docs/content/contributing/new/git.md index 02e5af34..34fc0245 100644 --- a/docs/content/contributing/new/git.md +++ b/docs/content/contributing/new/git.md @@ -45,7 +45,7 @@ Book. commit them to the log we mentioned. You have a few options for writing a message that will be stored with the commit in the log, more on that later.
Branch
-
When you are in the repository the default is usually called master, +
When you are in the repository the default out of the box is usually called `master`. This is the main branch of the repository (NOTE: if you are creating a new repository of your own, please change the default branch to `main`. `master` is an inappropriate and offensive), the main branch of the repository. Typically you will want to do your work on a new branch for each feature or bug. This allows you to see and work on different versions of the same code in one repository.
@@ -53,9 +53,7 @@ Book.
To check out a branch, is to switch to view that branches version of the files in the repository.
Merge
-
When you want to incorporate another branch, master or someone else's - feature for example, into your current branch you will merge the changes. This will apply - the other changes on top of yours. +
When you want to incorporate another branch, `main` or someone else's feature for example, into your current branch you will merge the changes. This will apply the other changes on top of yours.
Remote
This is just a repository, that is accessible remotely. You can use the git command to push and pull changes to.
diff --git a/docs/content/contributing/new/github.md b/docs/content/contributing/new/github.md index 27a75167..602f322d 100644 --- a/docs/content/contributing/new/github.md +++ b/docs/content/contributing/new/github.md @@ -72,9 +72,7 @@ pull request. You can discuss the changes requested in the pull request itself, or if you need help with something in particular you can reach out to us in the `#athens` channel on [Gophers Slack](https://gophers.slack.com). -After all requested changes are resolved a maintainer will give it a final look -and as long as our continuous integration passed they will merge it with the -master branch. +After all requested changes are resolved a maintainer will give it a final look and as long as our continuous integration passed they will merge it with the `main` branch. #### Project process @@ -101,7 +99,7 @@ straight the pull request. ##### Open a pull request After you have created a branch on your fork, and made the changes. Please make -sure all tests still pass, see [DEVELOPMENT.md](https://github.com/gomods/athens/blob/master/CONTRIBUTING.md#verify-your-work) for details. Then after you push all changes +sure all tests still pass, see [DEVELOPMENT.md](https://github.com/gomods/athens/blob/main/CONTRIBUTING.md#verify-your-work) for details. Then after you push all changes up to your fork, head over to [Athens](https://github.com/gomods/athens) to open a pull request. Usually, right after you have pushed a new branch and you visit the original repository, GitHub will prompt you to open a new pull request. Otherwise you can do so from diff --git a/docs/content/install/install-on-kubernetes.md b/docs/content/install/install-on-kubernetes.md index 919bc395..5f22e83c 100644 --- a/docs/content/install/install-on-kubernetes.md +++ b/docs/content/install/install-on-kubernetes.md @@ -121,7 +121,7 @@ For more information, see [Managing Compute Resources for Containers](https://ku ### Give Athens access to private repositories via Github Token (Optional) 1. Create a token at https://github.com/settings/tokens -2. Provide the token to the Athens proxy either through the [config.toml](https://github.com/gomods/athens/blob/master/config.dev.toml) file (the `GithubToken` field) or by setting the `ATHENS_GITHUB_TOKEN` environment variable. +2. Provide the token to the Athens proxy either through the [config.toml](https://github.com/gomods/athens/blob/main/config.dev.toml) file (the `GithubToken` field) or by setting the `ATHENS_GITHUB_TOKEN` environment variable. ### Storage Providers diff --git a/docs/content/install/install-on-kubernetes.zh.md b/docs/content/install/install-on-kubernetes.zh.md index 1c72a67e..58a4d32d 100755 --- a/docs/content/install/install-on-kubernetes.zh.md +++ b/docs/content/install/install-on-kubernetes.zh.md @@ -120,7 +120,7 @@ helm install gomods/athens-proxy -n athens --namespace athens \ ### 通过Github令牌(Token)授予athens访问私有存储库的权限(可选) 1. 在 https://github.com/settings/tokens 上创建一个令牌(Token) -2. 通过 [config.toml](https://github.com/gomods/athens/blob/master/config.dev.toml) 文件 ( `GithubToken` 字段) 或 通过设置`ATHENS_GITHUB_TOKEN` 环境变量,将令牌提供给Athens代理. +2. 通过 [config.toml](https://github.com/gomods/athens/blob/main/config.dev.toml) 文件 ( `GithubToken` 字段) 或 通过设置`ATHENS_GITHUB_TOKEN` 环境变量,将令牌提供给Athens代理. ### 存储提供程序(storage provider) diff --git a/docs/content/install/using-docker.md b/docs/content/install/using-docker.md index 8c698a78..c5ac1186 100644 --- a/docs/content/install/using-docker.md +++ b/docs/content/install/using-docker.md @@ -12,8 +12,8 @@ Whether setting Athens up using [Kubernetes](./install-on-kubernetes) or using t The Athens project produces two docker images, available via [Docker Hub](https://hub.docker.com/) -1. A release version as [`gomods/athens`](https://hub.docker.com/gomods/athens), each tag corresponds with an Athens [release](https://github.com/gomods/athens/releases), e.g. `v0.7.1`. Additionally, a `canary` tag is available and tracks each commit to `master` -2. A tip version, as [`gomods/athens-dev`](https://hub.docker.com/r/gomods/athens-dev), tagged with every commit to `master`, e.g. `1573339` +1. A release version as [`gomods/athens`](https://hub.docker.com/gomods/athens), each tag corresponds with an Athens [release](https://github.com/gomods/athens/releases), e.g. `v0.7.1`. Additionally, a `canary` tag is available and tracks each commit to `main` +2. A tip version, as [`gomods/athens-dev`](https://hub.docker.com/r/gomods/athens-dev), tagged with every commit to `main`, e.g. `1573339` For a detailed tags list, check each image's Docker Hub diff --git a/docs/content/intro/why.md b/docs/content/intro/why.md index ce1e3c43..56a3919b 100644 --- a/docs/content/intro/why.md +++ b/docs/content/intro/why.md @@ -21,7 +21,7 @@ The Go community has had lots of problems with libraries disappearing or changin ### Logic -The fact that the Go command line can now ping _your own_ server to download dependencies, that means you can program whatever logic you want around providing such dependencies. Things like Access Control (discussed below), adding custom versions, custom forks, and custom packages. For example, Athens provides a [Validation Hook](https://github.com/gomods/athens/blob/master/config.dev.toml#L127) that will get called for every module download to determine whether a module should be downloaded or not. Therefore, you can extend Athens with your own logic such as scanning a module path or code for red flags etc. +The fact that the Go command line can now ping _your own_ server to download dependencies, that means you can program whatever logic you want around providing such dependencies. Things like Access Control (discussed below), adding custom versions, custom forks, and custom packages. For example, Athens provides a [Validation Hook](https://github.com/gomods/athens/blob/main/config.dev.toml#L127) that will get called for every module download to determine whether a module should be downloaded or not. Therefore, you can extend Athens with your own logic such as scanning a module path or code for red flags etc. ### Performance diff --git a/docs/content/intro/why.zh.md b/docs/content/intro/why.zh.md index abab4cf9..84f57efb 100755 --- a/docs/content/intro/why.zh.md +++ b/docs/content/intro/why.zh.md @@ -22,7 +22,7 @@ Athens通过将代码从VCS复制到_不可变_存储中来解决这些问题。 ### 逻辑 -go命令行现在可以ping _您自己的服务器_ 来下载依赖项,这意味着您可以编写任何需要的逻辑来提供这种依赖项。包括访问控制(下面将讨论)、添加自定义版本、自定义分支和自定义包等。例如,Athens提供了一个[验证钩子(hook)](https://github.com/gomods/athens/blob/master/config.dev.toml#L127),每个模块下载时都会调用它来确定是否应该下载此模块。因此,您可以用自己的逻辑扩展athens,比如扫描模块路径或代码以查找标红代码等。 +go命令行现在可以ping _您自己的服务器_ 来下载依赖项,这意味着您可以编写任何需要的逻辑来提供这种依赖项。包括访问控制(下面将讨论)、添加自定义版本、自定义分支和自定义包等。例如,Athens提供了一个[验证钩子(hook)](https://github.com/gomods/athens/blob/main/config.dev.toml#L127),每个模块下载时都会调用它来确定是否应该下载此模块。因此,您可以用自己的逻辑扩展athens,比如扫描模块路径或代码以查找标红代码等。 ### 性能 diff --git a/scripts/check_conflicts.sh b/scripts/check_conflicts.sh index 98c0f8fe..a8548e1c 100755 --- a/scripts/check_conflicts.sh +++ b/scripts/check_conflicts.sh @@ -10,13 +10,13 @@ # the script will exit with code 1 on finding any matches, causing the # CI build to fail. Merge conflict artifacts must be removed before continuing. -git remote set-branches --add origin master && git fetch -COUNT=$(git diff origin/master -- . ':!*.go' ':!go.mod' ':!go.sum' | grep -Ec "^\+[<>=]{7}\w{0,}") +git remote set-branches --add origin main && git fetch +COUNT=$(git diff origin/main -- . ':!*.go' ':!go.mod' ':!go.sum' | grep -Ec "^\+[<>=]{7}\w{0,}") if (($COUNT > 0));then echo "************************************************************" echo "The following files contained merge conflict artifacts:\n" - exec git diff --name-only -G'^[<>=]{7}\w?' origin/master -- . ':!*.go' ':!go.mod' ':!go.sum' + exec git diff --name-only -G'^[<>=]{7}\w?' origin/main -- . ':!*.go' ':!go.mod' ':!go.sum' echo "************************************************************" exit 1 fi diff --git a/scripts/check_deps.sh b/scripts/check_deps.sh index 0d5a2d08..7de7577a 100755 --- a/scripts/check_deps.sh +++ b/scripts/check_deps.sh @@ -11,8 +11,8 @@ # before a pull request can be merged. set -xeuo pipefail -git remote set-branches --add origin master && git fetch -ChangedFiles=`git diff --name-only origin/master` +git remote set-branches --add origin main && git fetch +ChangedFiles=`git diff --name-only origin/main` # in the case that ChangedFiles contains go.mod or go.sum run go mod verify case "$ChangedFiles" in diff --git a/scripts/ps/check_deps.ps1 b/scripts/ps/check_deps.ps1 index d718fee1..f96a0d87 100644 --- a/scripts/ps/check_deps.ps1 +++ b/scripts/ps/check_deps.ps1 @@ -7,8 +7,8 @@ # to check for any conflicts in versions or digests # which on any exit code > 0 would suggest that action should be taken # before a pull request can be merged. -git remote set-branches --add origin master ; git fetch -$ChangedFiles=$(git diff --name-only origin/master) +git remote set-branches --add origin main ; git fetch +$ChangedFiles=$(git diff --name-only origin/main) # in the case that ChangedFiles contains go.mod or go.sum run go mod verify $contains= $ChangedFiles | Select-String -Pattern "go.mod|go.sum" diff --git a/scripts/push-docker-images.sh b/scripts/push-docker-images.sh index c43e3c28..199ca2d0 100755 --- a/scripts/push-docker-images.sh +++ b/scripts/push-docker-images.sh @@ -14,8 +14,8 @@ if [[ "${MUTABLE_TAG:-}" == "" ]]; then # tagged builds if [[ "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then MUTABLE_TAG="latest" - # master build - elif [[ "$BRANCH" == "master" ]]; then + # main branch build + elif [[ "$BRANCH" == "main" ]]; then MUTABLE_TAG="canary" # branch build else diff --git a/test/ct.yaml b/test/ct.yaml index 117c200b..75576f8f 100644 --- a/test/ct.yaml +++ b/test/ct.yaml @@ -1,4 +1,4 @@ -target-branch: master +target-branch: main chart-dirs: - charts helm-extra-args: --timeout 800