From 92fc379921af0f764c4b6d7cd2a973632258dedb Mon Sep 17 00:00:00 2001 From: Jacob Bolda Date: Sun, 5 Jul 2020 18:00:49 -0500 Subject: [PATCH] feat: remove master branch, switch to git merge --ff-only (#744) * feat: remove master branch, switch to git merge --ff-only * rename pr-to-latest.yml --- .github/CONTRIBUTING.md | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/build-smoke-tests.yml | 2 +- .github/workflows/check-on-push.yml | 2 +- .../workflows/{pr-to-master.yml => pr-to-latest.yml} | 12 ++++++------ .github/workflows/pr-version-updates.yml | 2 +- .github/workflows/release-cargo.yml | 4 ++-- .github/workflows/release-npm.yml | 4 ++-- README.md | 2 +- maskfile.md | 8 ++++---- 10 files changed, 20 insertions(+), 20 deletions(-) rename .github/workflows/{pr-to-master.yml => pr-to-latest.yml} (84%) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index ec1cb3080..bb49a4723 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -31,7 +31,7 @@ Hi! We, the maintainers, are really excited that you are interested in contribut ## Pull Request Guidelines -- The `master` branch is basically just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `master` branch.** +- The `latest` branch is basically just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `latest` branch.** - Checkout a topic branch from the relevant branch, e.g. `dev`, and merge back against that branch. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 9571d3d96..66d9b7307 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -30,7 +30,7 @@ If yes, please describe the impact and migration path for existing applications **The PR fulfills these requirements:** -- [ ] It's submitted to the `dev` branch and _not_ the `master` branch +- [ ] It's submitted to the `dev` branch and _not_ the `latest` branch - [ ] When resolving a specific issue, it's referenced in the PR's title (e.g. `fix: #xxx[,#xxx]`, where "xxx" is the issue number) - [ ] A change file is added if any packages will require a version bump due to this PR per [the instructions in the readme](https://github.com/tauri-apps/tauri/blob/dev/.changes/readme.md). diff --git a/.github/workflows/build-smoke-tests.yml b/.github/workflows/build-smoke-tests.yml index b19febc55..718a62660 100644 --- a/.github/workflows/build-smoke-tests.yml +++ b/.github/workflows/build-smoke-tests.yml @@ -56,7 +56,7 @@ jobs: uses: actions/checkout@v2 with: repository: tauri-apps/examples - ref: master + ref: latest path: examples - name: install rust stable uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/check-on-push.yml b/.github/workflows/check-on-push.yml index 8b2a9a0cf..ece909e5c 100644 --- a/.github/workflows/check-on-push.yml +++ b/.github/workflows/check-on-push.yml @@ -3,7 +3,7 @@ name: clippy and eslint check on: push: branches-ignore: - - master + - latest - dev jobs: diff --git a/.github/workflows/pr-to-master.yml b/.github/workflows/pr-to-latest.yml similarity index 84% rename from .github/workflows/pr-to-master.yml rename to .github/workflows/pr-to-latest.yml index 650f78312..b9c6a9f4f 100644 --- a/.github/workflows/pr-to-master.yml +++ b/.github/workflows/pr-to-latest.yml @@ -1,4 +1,4 @@ -name: pr-to-master +name: pr-to-latest on: push: @@ -6,28 +6,28 @@ on: - dev jobs: - pr-to-master: + pr-to-latest: runs-on: ubuntu-latest if: contains(github.event.head_commit.message, 'version updates') steps: - uses: actions/checkout@v2 with: - ref: master + ref: latest - name: git config run: | git config --global user.name "${{ github.event.pusher.name }}" git config --global user.email "${{ github.event.pusher.email }}" - run: git fetch origin dev - - run: git read-tree -u --reset ${{ github.sha }} + - run: git merge ${{ github.sha }} --ff-only - name: Create Pull Request uses: tauri-apps/create-pull-request@v2.8.0 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: ${{ github.event.head_commit.message }} - branch: release/master + branch: release/latest branch-suffix: short-commit-hash title: Publish labels: "publish" body: | - Merging this PR will squash and push all changes to the master branch. + Merging this PR will squash and push all changes to the latest branch. It will kick off the process to release and publish any packages with an incremented version number. diff --git a/.github/workflows/pr-version-updates.yml b/.github/workflows/pr-version-updates.yml index ce73af0d8..ca42d5cde 100644 --- a/.github/workflows/pr-version-updates.yml +++ b/.github/workflows/pr-version-updates.yml @@ -6,7 +6,7 @@ on: - dev jobs: - pr-to-master: + pr-to-latest: runs-on: ubuntu-latest steps: diff --git a/.github/workflows/release-cargo.yml b/.github/workflows/release-cargo.yml index 637463dae..6c04d6826 100644 --- a/.github/workflows/release-cargo.yml +++ b/.github/workflows/release-cargo.yml @@ -3,7 +3,7 @@ name: release-cargo on: push: branches: - - master + - latest paths: - '**/Cargo.toml' - '.github/workflows/**' @@ -44,7 +44,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: master + ref: latest toolchain: stable - name: get version working-directory: ${{ matrix.package.path }} diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index c7064397b..12e0e59b3 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -3,7 +3,7 @@ name: release-npm on: push: branches: - - master + - latest paths: - '**/package.json' - '.github/workflows/**' @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - ref: master + ref: latest - uses: actions/setup-node@v1 with: node-version: 12 diff --git a/README.md b/README.md index 46b0e0aa3..f787c3c25 100644 --- a/README.md +++ b/README.md @@ -148,7 +148,7 @@ Documentation in a polyglot system is a tricky proposition. To this end, we pref Test all the things! We have a number of test suites, but are always looking to improve our coverage: - Rust (`cargo test`) => sourced via inline `#[cfg(test)]` declarations - TS (`jest`) => via spec files -- Smoke Tests (run on merges to master) +- Smoke Tests (run on merges to latest) - eslint, clippy ### CI/CD diff --git a/maskfile.md b/maskfile.md index c7fb92741..e31bbe10a 100644 --- a/maskfile.md +++ b/maskfile.md @@ -2,11 +2,11 @@ ## prepare -> Setup all stuffs needed for runing the examples +> Setup all stuffs needed for running the examples ```sh git clone --recursive git@github.com:tauri-apps/examples.git \ -|| (cd examples && git pull origin master; cd ..) # always prepare up-to-date examples in case it's already available +|| (cd examples && git pull origin dev; cd ..) # always prepare up-to-date examples in case it's already available export TAURI_DIST_DIR=$PWD/tauri/test/fixture/dist export TAURI_DIR=$PWD/tauri/test/fixture/src-tauri @@ -44,8 +44,8 @@ if (-Not (Test-Path $CWD\examples -PathType Any)) { } | Receive-Job -AutoRemoveJob -Wait } -# Enter the examples folder and pull the latest data from origin/master -cd examples; git pull origin master; cd .. +# Enter the examples folder and pull the latest data from origin/dev +cd examples; git pull origin dev; cd .. # Check that dist_path and src_path exist. if ((Test-Path $dist_path -PathType Any) -Or (Test-Path $src_path -PathType Any)) {