Skip to content

Commit

Permalink
Switching to using the main default branch (gomods#1628)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
arschles and marwan-at-work authored Jun 15, 2020
1 parent f01c645 commit c2c5daf
Show file tree
Hide file tree
Showing 25 changed files with 50 additions and 54 deletions.
8 changes: 4 additions & 4 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ steps:
from_secret: ATHENS_AZURE_ACCOUNT_KEY
when:
branch:
- master
- main
event:
- push
- pull_request
Expand All @@ -84,7 +84,7 @@ steps:
- VERSION=${DRONE_COMMIT}
when:
branch:
- master
- main
event:
- push

Expand All @@ -103,7 +103,7 @@ steps:
- VERSION=${DRONE_COMMIT}
when:
branch:
- master
- main
event:
- push

Expand Down Expand Up @@ -135,7 +135,7 @@ steps:
from_secret: AZURE_STORAGE_CONNECTION_STRING
when:
branch:
- master
- main
event:
- push

Expand Down
26 changes: 13 additions & 13 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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 <commit from master>
$ git cherry-pick <commit from main>
....
```

### 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

Expand All @@ -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.
2 changes: 1 addition & 1 deletion REVIEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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!
4 changes: 2 additions & 2 deletions charts/athens-proxy/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/athens-proxy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/content/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/configuration/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion docs/content/contributing/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/content/contributing/community/philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/content/contributing/community/triaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
4 changes: 2 additions & 2 deletions docs/content/contributing/maintainers/first-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/content/contributing/new/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -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+.
Expand Down
2 changes: 1 addition & 1 deletion docs/content/contributing/new/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Alternatively you can run our custom docker image as outlined [here](./DEVELOPMENT.md#run-the-docs)
6 changes: 2 additions & 4 deletions docs/content/contributing/new/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,15 @@ 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.</dd>
<dt>Branch</dt>
<dd>When you are in the repository the default is usually called master,
<dd>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.</dd>
<dt>Checkout</dt>
<dd>To check out a branch, is to switch to view that branches version of the
files in the repository.</dd>
<dt>Merge</dt>
<dd>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.
<dd>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.
<dt>Remote</dt>
<dd>This is just a repository, that is accessible remotely. You can use the
git command to push and pull changes to.</dd>
Expand Down
6 changes: 2 additions & 4 deletions docs/content/contributing/new/github.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/content/install/install-on-kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/content/install/install-on-kubernetes.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions docs/content/install/using-docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docs/content/intro/why.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit c2c5daf

Please sign in to comment.