Skip to content

Commit

Permalink
chore: rename upload branch to main (#3888)
Browse files Browse the repository at this point in the history
* chore: rename `upload` branch to `main`
  • Loading branch information
scarf005 authored Dec 13, 2023
1 parent 2af4ddb commit 6fde889
Show file tree
Hide file tree
Showing 21 changed files with 127 additions and 129 deletions.
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ body:

### Open Options (ESC) -> Debug Menu

![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/src/content/docs/en/contribute/img/readme-bug1.png?raw=true)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/doc/src/content/docs/en/contribute/img/readme-bug1.png?raw=true)

### Open Info (i)

![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/src/content/docs/en/contribute/img/readme-bug2.png?raw=true)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/doc/src/content/docs/en/contribute/img/readme-bug2.png?raw=true)

### Submit a bug report on github (U)

![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/src/content/docs/en/contribute/img/readme-bug3.png?raw=true)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/doc/src/content/docs/en/contribute/img/readme-bug3.png?raw=true)

### Fill the form and submit

![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/doc/src/content/docs/en/contribute/img/readme-bug4.png?raw=true)
![](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/doc/src/content/docs/en/contribute/img/readme-bug4.png?raw=true)

- type: textarea
id: describe-bug
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Cataclysm Android build
on:
pull_request:
branches:
- upload
- main
paths-ignore:
- "build-data/osx/**"
- "doc/**"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Clang-tidy (clang-12, tiles)

on:
push:
branches: [upload]
branches: [main]
paths: [ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", "build-scripts/**","tools/clang-tidy-plugin/**", ".github/workflows/clang-tidy.yml", "**/.clang-tidy" ]
pull_request:
branches: [upload]
branches: [main]
paths: [ "**.cpp", "**.h", "**.c", "**/CMakeLists.txt", "**/Makefile", "**.hpp", "**.cmake", "build-scripts/**", "tools/clang-tidy-plugin/**", ".github/workflows/clang-tidy.yml", "**/.clang-tidy" ]

# We only care about the latest revision of a PR, so cancel all previous instances.
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
sudo apt-get update
sudo apt-get install libncursesw5-dev clang-12 libclang-12-dev llvm-12-dev llvm-12-tools \
libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libpulse-dev ccache \
libflac-dev gettext
libflac-dev gettext

- name: prepare
run: bash ./build-scripts/requirements.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Deploy starlight documentation to GitHub Pages

on:
push:
branches: [upload]
branches: [main]
paths: [doc/**]
workflow_dispatch:

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ name: General build matrix
on:
push:
branches:
- upload
- main
paths-ignore:
- doc/**
- 'scripts/**'
merge_group:
pull_request:
branches:
- upload
- main
paths-ignore:
- doc/**
- 'scripts/**'

# Cancel all previous instances in favor of latest revision of a PR.
# Allow running upload builds to complete to help with ccache refreshes.
# Allow running main builds to complete to help with ccache refreshes.
concurrency:
group: general-build-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -58,9 +58,9 @@ jobs:
steps:
- id: matrix_vars
run: |
echo "fail_fast=$([ "$GITHUB_REF_NAME" = "upload" ] && echo false || echo true)" >> $GITHUB_OUTPUT
echo "skip_tests=$([ "$GITHUB_REF_NAME" = "upload" ] && echo true || echo false)" >> $GITHUB_OUTPUT
echo "max_parallel=$([ "$GITHUB_REF_NAME" = "upload" ] && echo 20 || echo 1)" >> $GITHUB_OUTPUT
echo "fail_fast=$([ "$GITHUB_REF_NAME" = "main" ] && echo false || echo true)" >> $GITHUB_OUTPUT
echo "skip_tests=$([ "$GITHUB_REF_NAME" = "main" ] && echo true || echo false)" >> $GITHUB_OUTPUT
echo "max_parallel=$([ "$GITHUB_REF_NAME" = "main" ] && echo 20 || echo 1)" >> $GITHUB_OUTPUT

varied_builds:
needs: [ skip-duplicates-code, skip-duplicates-data, matrix-variables ]
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
path: ${{ steps.get-ccache-vars.outputs.ccache-path }}
# double-dash after compiler is not a typo, it is to disambiguate between g++-<date> and g++-11-<date> for restore key prefix matching
key: ccache-${{ github.ref_name }}-${{ matrix.ccache_key }}--${{ steps.get-ccache-vars.outputs.datetime }}
restore-keys: ccache-upload-${{ matrix.ccache_key }}--
restore-keys: ccache-main-${{ matrix.ccache_key }}--

- name: ccache info
if: ${{ env.SKIP == 'false' && steps.cache.outputs.cache-hit != 'true' }}
Expand All @@ -258,7 +258,7 @@ jobs:
ccache --show-stats --verbose

- name: clear ccache on PRs
if: ${{ github.ref_name != 'upload' && env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }}
if: ${{ github.ref_name != 'main' && env.SKIP == 'false' && !failure() && (runner.os == 'Linux' || runner.os == 'macOS') }}
run: ccache --clear

- name: run tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msvc-full-features-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Cataclysm Windows build (CMake + MSVC)
on:
push:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/msvc-full-features.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Cataclysm Windows build (MSVC)
on:
push:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand All @@ -18,7 +18,7 @@ on:
- 'scripts/**'
pull_request:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msys2-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Windows build (CMake + MSYS2)
on:
push:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Windows build (MSYS2)
on:
push:
branches:
- upload
- main
paths-ignore:
- 'android/**'
- 'build-data/osx/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
token: ${{ secrets.TX_PR_CREATOR }}
branch: i18n
delete-branch: true
base: upload
base: main
title: "feat(i18n): routine i18n updates on ${{ steps.get-timestamp.outputs.time }}"
body: ""
labels: Translation
2 changes: 1 addition & 1 deletion data/raw/generate_docs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ sidebar:
This page is auto-generated from [`data/raw/generate_docs.lua`][generate_docs]
and should not be edited directly.

[generate_docs]: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/data/raw/generate_docs.lua
[generate_docs]: https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/data/raw/generate_docs.lua

:::

Expand Down
2 changes: 1 addition & 1 deletion doc/astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default defineConfig({
"./src/styles/theme.css",
"./src/styles/capitalize.css",
],
editLink: { baseUrl: `${github}/edit/upload/doc` },
editLink: { baseUrl: `${github}/edit/main/doc` },
lastUpdated: true,
navbar: {
game: {
Expand Down
74 changes: 37 additions & 37 deletions doc/src/content/docs/en/contribute/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ irrevocable.
There are a couple of guidelines we suggest sticking to:

- Add this repository as an `upstream` remote.
- Keep your `upload` branch clean. This means you can easily pull changes made to this repository
into yours.
- Keep your `main` branch clean. This means you can easily pull changes made to this repository into
yours.
- Create a new branch for each new feature or set of related bug fixes.
- Never merge from your local branches into your `upload` branch. Only update that by pulling from
`upstream/upload`.
- Never merge from your local branches into your `main` branch. Only update that by pulling from
`upstream/main`.

## Code Style

Expand Down Expand Up @@ -198,28 +198,28 @@ For further details about commit message guidelines please visit:
- [chris.beams.io](https://chris.beams.io/posts/git-commit/)
- [help.github.com](https://help.github.com/articles/closing-issues-using-keywords/)

### Update your `upload` branch
### Update your `main` branch

1. Make sure you have your `upload` branch checked out.
1. Make sure you have your `main` branch checked out.

```sh
$ git checkout upload
$ git checkout main
```

2. Pull the changes from the `upstream/upload` branch.
2. Pull the changes from the `upstream/main` branch.

```sh
$ git pull --ff-only upstream upload
# gets changes from "upload" branch on the "upstream" remote
$ git pull --ff-only upstream main
# gets changes from "main" branch on the "upstream" remote
```

> **Note** If this gives you an error, it means you have committed directly to your local `upload`
> **Note** If this gives you an error, it means you have committed directly to your local `main`
> branch.
> [Click here for instructions on how to fix this issue](#why-does-git-pull---ff-only-result-in-an-error).

### Make your changes

0. Update your `upload` branch, if you haven't already.
0. Update your `main` branch, if you haven't already.

1. For each new feature or bug fix, create a new branch.

Expand All @@ -238,7 +238,7 @@ $ git push origin new_feature
```

3. Once you're finished working on your branch, and have committed and pushed all your changes,
submit a pull request from your `new_feature` branch to this repository's `upload` branch.
submit a pull request from your `new_feature` branch to this repository's `main` branch.

> **Note** any new commits to the `new_feature` branch on GitHub will automatically be included in
> the pull request, so make sure to only commit related changes to the same branch.
Expand Down Expand Up @@ -312,16 +312,16 @@ These guidelines aren't essential, but they can make keeping things in order muc

### Using remote tracking branches

Remote tracking branches allow you to easily stay in touch with this repository's `upload` branch,
as they automatically know which remote branch to get changes from.
Remote tracking branches allow you to easily stay in touch with this repository's `main` branch, as
they automatically know which remote branch to get changes from.

```sh
$ git branch -vv
* upload xxxx [origin/upload] ....
* main xxxx [origin/main] ....
new_feature xxxx ....
```

Here you can see we have two branches; `upload` which is tracking `origin/upload`, and `new_feature`
Here you can see we have two branches; `main` which is tracking `origin/main`, and `new_feature`
which isn't tracking any branch. In practice, what this means is that git won't know where to get
changes from.

Expand All @@ -333,12 +333,12 @@ There is no tracking information for the current branch.
Please specify which branch you want to merge with.
```

In order to easily pull changes from `upstream/upload` into the `new_feature` branch, we can tell
git which branch it should track. (You can even do this for your local upload branch.)
In order to easily pull changes from `upstream/main` into the `new_feature` branch, we can tell git
which branch it should track. (You can even do this for your local main branch.)

```sh
$ git branch -u upstream/upload new_feature
Branch new_feature set up to track remote branch upload from upstream.
$ git branch -u upstream/main new_feature
Branch new_feature set up to track remote branch main from upstream.
$ git pull
Updating xxxx..xxxx
....
Expand All @@ -347,13 +347,13 @@ Updating xxxx..xxxx
You can also set the tracking information at the same time as creating the branch.

```sh
$ git branch new_feature_2 --track upstream/upload
Branch new_feature_2 set up to track remote branch upload from upstream.
$ git branch new_feature_2 --track upstream/main
Branch new_feature_2 set up to track remote branch main from upstream.
```

> **Note**: Although this makes it easier to pull from `upstream/upload`, it doesn't change anything
> **Note**: Although this makes it easier to pull from `upstream/main`, it doesn't change anything
> with regards to pushing. `git push` fails because you don't have permission to push to
> `upstream/upload`.
> `upstream/main`.

```sh
$ git push
Expand Down Expand Up @@ -420,29 +420,29 @@ debug menu.

### Why does `git pull --ff-only` result in an error?

If `git pull --ff-only` shows an error, it means that you've committed directly to your local
`upload` branch. To fix this, we create a new branch with these commits, find the point at which we
diverged from `upstream/upload`, and then reset `upload` to that point.
If `git pull --ff-only` shows an error, it means that you've committed directly to your local `main`
branch. To fix this, we create a new branch with these commits, find the point at which we diverged
from `upstream/main`, and then reset `main` to that point.

```sh
$ git pull --ff-only upstream upload
$ git pull --ff-only upstream main
From https://github.com/cataclysmbnteam/Cataclysm-BN
* branch upload -> FETCH_HEAD
* branch main -> FETCH_HEAD
fatal: Not possible to fast-forward, aborting.
$ git branch new_branch upload # mark the current commit with a tmp branch
$ git merge-base upload upstream/upload
cc31d0... # the last commit before we committed directly to upload
$ git branch new_branch main # mark the current commit with a tmp branch
$ git merge-base main upstream/main
cc31d0... # the last commit before we committed directly to main
$ git reset --hard cc31d0....
HEAD is now at cc31d0... ...
```

Now that `upload` has been cleaned up, we can easily pull from `upstream/upload`, and then continue
Now that `main` has been cleaned up, we can easily pull from `upstream/main`, and then continue
working on `new_branch`.

```sh
$ git pull --ff-only upstream upload
# gets changes from the "upstream" remote for the matching branch, in this case "upload"
$ git pull --ff-only upstream main
# gets changes from the "upstream" remote for the matching branch, in this case "main"
$ git checkout new_branch
```

For more frequently asked questions, see the [developer FAQ](../dev/reference/FAQ).
For more frequently asked questions, see the [developer FAQ](../dev/reference/faq.md).
2 changes: 1 addition & 1 deletion doc/src/content/docs/en/dev/guides/building/makefile.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ builds the SDL version with all features enabled, including tiles, sound and loc
- SDL2_image (tested with 2.0.3)

The Gradle build process automatically installs dependencies from
[deps.zip](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/upload/android/app/deps.zip).
[deps.zip](https://github.com/cataclysmbnteam/Cataclysm-BN/blob/main/android/app/deps.zip).

### Setup

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ git checkout ddamaster
git pull
```

This shouldn't result in any conflicts. If it did, you probably committed changes to the upload
This shouldn't result in any conflicts. If it did, you probably committed changes to the main
branch. In this case you may want to back them up:

```
git checkout -b temp-branch-name
```

And reset the upload branch to the remote:
And reset the main branch to the remote:

```
git branch -f ddamaster dda/master
Expand All @@ -70,7 +70,7 @@ git branch -f ddamaster dda/master

```
# Switch to BN branch
git checkout upload
git checkout main
# Update local content
git pull
# Create new branch for your changes
Expand Down
Loading

0 comments on commit 6fde889

Please sign in to comment.