From 4e116f50bc5251e1abaa59d357864df339299453 Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sat, 16 Sep 2023 12:24:28 +0200 Subject: [PATCH 1/7] github: add codeowners file --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..2ae8963e3 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +/.github/**/* @torrust/maintainers From 9fb75e4bb92ac5cf42a9e4b0ffa36f85cfd74b69 Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sat, 16 Sep 2023 12:25:47 +0200 Subject: [PATCH 2/7] ci: secret checks were unnecessary --- .github/workflows/container.yaml | 27 +++++---------------------- .github/workflows/coverage.yaml | 18 ------------------ .github/workflows/deployment.yaml | 22 ++-------------------- 3 files changed, 7 insertions(+), 60 deletions(-) diff --git a/.github/workflows/container.yaml b/.github/workflows/container.yaml index d107a0139..c33ea16c8 100644 --- a/.github/workflows/container.yaml +++ b/.github/workflows/container.yaml @@ -54,6 +54,7 @@ jobs: context: name: Context + needs: test runs-on: ubuntu-latest outputs: @@ -97,29 +98,11 @@ jobs: echo "On a Forked Repository. Will Not Continue" fi - secrets: - name: Secrets - needs: [test, context] - environment: dockerhub-torrust - if: needs.context.outputs.continue == 'true' - runs-on: ubuntu-latest - - outputs: - continue: ${{ steps.check.outputs.continue }} - - steps: - - id: check - name: Check - env: - DOCKER_HUB_ACCESS_TOKEN: "${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}" - if: "${{ env.DOCKER_HUB_ACCESS_TOKEN != '' }}" - run: echo "continue=true" >> $GITHUB_OUTPUT - publish_development: name: Publish (Development) environment: dockerhub-torrust - needs: [secrets, context] - if: needs.secrets.outputs.continue == 'true' && needs.context.outputs.type == 'development' + needs: context + if: needs.context.outputs.continue == 'true' && needs.context.outputs.type == 'development' runs-on: ubuntu-latest steps: @@ -156,8 +139,8 @@ jobs: publish_release: name: Publish (Release) environment: dockerhub-torrust - needs: [secrets, context] - if: needs.secrets.outputs.continue == 'true' && needs.context.outputs.type == 'release' + needs: context + if: needs.context.outputs.continue == 'true' && needs.context.outputs.type == 'release' runs-on: ubuntu-latest steps: diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index cf7eb6f6d..1e7dace66 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -12,27 +12,9 @@ env: CARGO_TERM_COLOR: always jobs: - secrets: - name: Secrets - environment: coverage - runs-on: ubuntu-latest - - outputs: - continue: ${{ steps.check.outputs.continue }} - - steps: - - id: check - name: Check - env: - CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" - if: "${{ env.CODECOV_TOKEN != '' }}" - run: echo "continue=true" >> $GITHUB_OUTPUT - report: name: Report environment: coverage - needs: secrets - if: needs.secrets.outputs.continue == 'true' runs-on: ubuntu-latest env: CARGO_INCREMENTAL: "0" diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index ec349bf28..5df50a4b0 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -6,26 +6,8 @@ on: - "releases/**/*" jobs: - secrets: - name: Secrets - environment: crates-io-torrust - runs-on: ubuntu-latest - - outputs: - continue: ${{ steps.check.outputs.continue }} - - steps: - - id: check - name: Check - env: - CARGO_REGISTRY_TOKEN: "${{ secrets.CARGO_REGISTRY_TOKEN }}" - if: "${{ env.CARGO_REGISTRY_TOKEN != '' }}" - run: echo "continue=true" >> $GITHUB_OUTPUT - test: name: Test - needs: secrets - if: needs.secrets.outputs.continue == 'true' runs-on: ubuntu-latest strategy: @@ -49,7 +31,7 @@ jobs: publish: name: Publish - environment: crates-io-torrust + environment: deployment needs: test runs-on: ubuntu-latest @@ -67,7 +49,7 @@ jobs: - id: publish name: Publish Crates env: - CARGO_REGISTRY_TOKEN: "${{ secrets.CARGO_REGISTRY_TOKEN }}" + CARGO_REGISTRY_TOKEN: "${{ secrets.TORRUST_UPDATE_CARGO_REGISTRY_TOKEN }}" run: | cargo publish -p torrust-tracker-contrib-bencode cargo publish -p torrust-tracker-located-error From b990e777ca76fb0e8d135b4fa51359f809306f51 Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sat, 16 Sep 2023 12:26:55 +0200 Subject: [PATCH 3/7] docs: update release process --- docs/release_process.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/release_process.md b/docs/release_process.md index e29836191..4b5e39b25 100644 --- a/docs/release_process.md +++ b/docs/release_process.md @@ -1,4 +1,4 @@ -# Torrust Tracker Release Process (draft 2) +# Torrust Tracker Release Process (v2.1.0-draft) The purpose of this document is to describe the release process. @@ -12,19 +12,20 @@ Torrust Tracker is published according to this protocol: - The version is bumped according to releases, new features, and breaking changes. - [ ] `develop` is ready for branching for a release. -- [ ] force-push develop to `staging` branch. +- [ ] force-push `develop` to `staging/main` branch. - [ ] commit `release: version (semantic version)`, that removes the `-develop` suffix. -- [ ] create pull request to merge `staging` into `main` branch. -- [ ] check all status checks succeed for `main` branch. -- [ ] push `main` branch to `releases/(semantic version)` branch. +- [ ] create pull request to merge `staging/main` into `main` branch. +- [ ] push `main` branch to `releases/v(semantic version)` branch. - [ ] check all status checks success for `releases/(semantic version)` branch. - [ ] create signed `v(semantic version)` tag from `releases/(semantic version) HEAD`. - [ ] create github release from `v(semantic version)` tag. -- [ ] merge the `main` branch back into `develop` branch, assuring that the (semantic version) has the suffix `-develop`. +- [ ] force-push `main` to `staging/develop` branch. +- [ ] commit `develop: bump version (semantic version)-develop`, that bumps the version and adds the `-develop` suffix. +- [ ] create pull request to merge `staging/develop` into `develop` branch. - At step `1.`, `develop` is automatically published to `dockerhub`. - At step `3.`, `main` is automatically published to `dockerhub`. -- At step `6.`, `releases\v(semantic version)` is automatically published to `dockerhub` and `crate.io`. +- At step `6.`, `releases/v(semantic version)` is automatically published to `dockerhub` and `crate.io`. ## Development Branch From de884dde58b73c3bf619d097fe0c5bfb83454f12 Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sat, 16 Sep 2023 12:27:49 +0200 Subject: [PATCH 4/7] develop: bump version 3.0.0-alpha.9-develop --- Cargo.lock | 12 ++++++------ Cargo.toml | 12 ++++++------ README.md | 8 ++++---- packages/configuration/Cargo.toml | 4 ++-- packages/test-helpers/Cargo.toml | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 976e9b55d..f7f88c644 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3169,7 +3169,7 @@ dependencies = [ [[package]] name = "torrust-tracker" -version = "3.0.0-alpha.8-develop" +version = "3.0.0-alpha.9-develop" dependencies = [ "aquatic_udp_protocol", "async-trait", @@ -3215,7 +3215,7 @@ dependencies = [ [[package]] name = "torrust-tracker-configuration" -version = "3.0.0-alpha.8-develop" +version = "3.0.0-alpha.9-develop" dependencies = [ "config", "log", @@ -3230,7 +3230,7 @@ dependencies = [ [[package]] name = "torrust-tracker-contrib-bencode" -version = "3.0.0-alpha.8-develop" +version = "3.0.0-alpha.9-develop" dependencies = [ "criterion", "error-chain", @@ -3238,7 +3238,7 @@ dependencies = [ [[package]] name = "torrust-tracker-located-error" -version = "3.0.0-alpha.8-develop" +version = "3.0.0-alpha.9-develop" dependencies = [ "log", "thiserror", @@ -3246,7 +3246,7 @@ dependencies = [ [[package]] name = "torrust-tracker-primitives" -version = "3.0.0-alpha.8-develop" +version = "3.0.0-alpha.9-develop" dependencies = [ "derive_more", "serde", @@ -3254,7 +3254,7 @@ dependencies = [ [[package]] name = "torrust-tracker-test-helpers" -version = "3.0.0-alpha.8-develop" +version = "3.0.0-alpha.9-develop" dependencies = [ "lazy_static", "rand", diff --git a/Cargo.toml b/Cargo.toml index 0cb119a19..607ec3adb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ license-file = "COPYRIGHT" publish = true repository = "https://github.com/torrust/torrust-tracker" rust-version = "1.72" -version = "3.0.0-alpha.8-develop" +version = "3.0.0-alpha.9-develop" [dependencies] aquatic_udp_protocol = "0.8" @@ -56,10 +56,10 @@ serde_json = "1.0" serde_with = "3.2" thiserror = "1.0" tokio = { version = "1.29", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] } -torrust-tracker-configuration = { version = "3.0.0-alpha.8-develop", path = "packages/configuration" } -torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.8-develop", path = "contrib/bencode" } -torrust-tracker-located-error = { version = "3.0.0-alpha.8-develop", path = "packages/located-error" } -torrust-tracker-primitives = { version = "3.0.0-alpha.8-develop", path = "packages/primitives" } +torrust-tracker-configuration = { version = "3.0.0-alpha.9-develop", path = "packages/configuration" } +torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.9-develop", path = "contrib/bencode" } +torrust-tracker-located-error = { version = "3.0.0-alpha.9-develop", path = "packages/located-error" } +torrust-tracker-primitives = { version = "3.0.0-alpha.9-develop", path = "packages/primitives" } tower-http = { version = "0.4", features = ["compression-full"] } uuid = { version = "1", features = ["v4"] } @@ -70,7 +70,7 @@ reqwest = { version = "0.11.18", features = ["json"] } serde_bytes = "0.11" serde_repr = "0.1" serde_urlencoded = "0.7" -torrust-tracker-test-helpers = { version = "3.0.0-alpha.8-develop", path = "packages/test-helpers" } +torrust-tracker-test-helpers = { version = "3.0.0-alpha.9-develop", path = "packages/test-helpers" } [workspace] members = ["contrib/bencode", "packages/configuration", "packages/located-error", "packages/primitives", "packages/test-helpers"] diff --git a/README.md b/README.md index b5805446a..c07c2b7f7 100644 --- a/README.md +++ b/README.md @@ -179,13 +179,13 @@ This project was a joint effort by [Nautilus Cyberneering GmbH][nautilus] and [D [containers.md]: ./docs/containers.md -[api]: https://docs.rs/torrust-tracker/3.0.0-alpha.8-develop/torrust_tracker/servers/apis/v1 -[http]: https://docs.rs/torrust-tracker/3.0.0-alpha.8-develop/torrust_tracker/servers/http -[udp]: https://docs.rs/torrust-tracker/3.0.0-alpha.8-develop/torrust_tracker/servers/udp +[api]: https://docs.rs/torrust-tracker/3.0.0-alpha.9-develop/torrust_tracker/servers/apis/v1 +[http]: https://docs.rs/torrust-tracker/3.0.0-alpha.9-develop/torrust_tracker/servers/http +[udp]: https://docs.rs/torrust-tracker/3.0.0-alpha.9-develop/torrust_tracker/servers/udp [good first issues]: https://github.com/torrust/torrust-tracker/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 [documentation]: https://docs.rs/torrust-tracker/ -[API documentation]: https://docs.rs/torrust-tracker/3.0.0-alpha.8-develop/torrust_tracker/servers/apis/v1 +[API documentation]: https://docs.rs/torrust-tracker/3.0.0-alpha.9-develop/torrust_tracker/servers/apis/v1 [discussions]: https://github.com/torrust/torrust-tracker/discussions [COPYRIGHT]: ./COPYRIGHT diff --git a/packages/configuration/Cargo.toml b/packages/configuration/Cargo.toml index 631362c07..b9b4c50d8 100644 --- a/packages/configuration/Cargo.toml +++ b/packages/configuration/Cargo.toml @@ -21,8 +21,8 @@ serde = { version = "1.0", features = ["derive"] } serde_with = "3.2" thiserror = "1.0" toml = "0.8" -torrust-tracker-located-error = { version = "3.0.0-alpha.8-develop", path = "../located-error" } -torrust-tracker-primitives = { version = "3.0.0-alpha.8-develop", path = "../primitives" } +torrust-tracker-located-error = { version = "3.0.0-alpha.9-develop", path = "../located-error" } +torrust-tracker-primitives = { version = "3.0.0-alpha.9-develop", path = "../primitives" } [dev-dependencies] uuid = { version = "1", features = ["v4"] } diff --git a/packages/test-helpers/Cargo.toml b/packages/test-helpers/Cargo.toml index 0c85d31f6..e367d07cd 100644 --- a/packages/test-helpers/Cargo.toml +++ b/packages/test-helpers/Cargo.toml @@ -17,5 +17,5 @@ version.workspace = true [dependencies] lazy_static = "1.4" rand = "0.8.5" -torrust-tracker-configuration = { version = "3.0.0-alpha.8-develop", path = "../configuration" } -torrust-tracker-primitives = { version = "3.0.0-alpha.8-develop", path = "../primitives" } +torrust-tracker-configuration = { version = "3.0.0-alpha.9-develop", path = "../configuration" } +torrust-tracker-primitives = { version = "3.0.0-alpha.9-develop", path = "../primitives" } From 82622c5d0f39801d1321b554a264826f9376a04d Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sat, 16 Sep 2023 13:10:43 +0200 Subject: [PATCH 5/7] chore: update cargo lockfile --- Cargo.lock | 54 +++++++++++++++++++++++++++--------------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f7f88c644..afb4ef0b8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -142,7 +142,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -292,7 +292,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -473,9 +473,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.30" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd4e7873dbddba6c7c91e199c7fcb946abc4a6a4ac3195400bcfb01b5de877" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", @@ -749,7 +749,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -760,7 +760,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -793,7 +793,7 @@ checksum = "9abcad25e9720609ccb3dcdb795d845e37d8ce34183330a9f48b03a1a71c8e21" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -994,7 +994,7 @@ checksum = "b0fa992f1656e1707946bbba340ad244f0814009ef8c0118eb7b658395f19a2e" dependencies = [ "frunk_proc_macro_helpers", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -1006,7 +1006,7 @@ dependencies = [ "frunk_core", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -1018,7 +1018,7 @@ dependencies = [ "frunk_core", "frunk_proc_macro_helpers", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -1083,7 +1083,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -1374,7 +1374,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5305557fa27b460072ae15ce07617e999f5879f14d376c8449f0bfb9f9d8e91e" dependencies = [ "derive_utils", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -1738,7 +1738,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", "termcolor", "thiserror", ] @@ -1939,7 +1939,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -2062,7 +2062,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -2093,7 +2093,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -2724,7 +2724,7 @@ checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -2756,7 +2756,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -2806,7 +2806,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -2928,9 +2928,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.33" +version = "2.0.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9caece70c63bfba29ec2fed841a09851b14a235c60010fa4de58089b6c025668" +checksum = "59bf04c28bee9043ed9ea1e41afc0552288d3aba9c6efdd78903b802926f4879" dependencies = [ "proc-macro2", "quote", @@ -2994,7 +2994,7 @@ checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -3076,7 +3076,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", ] [[package]] @@ -3351,9 +3351,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -3467,7 +3467,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", "wasm-bindgen-shared", ] @@ -3501,7 +3501,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.33", + "syn 2.0.35", "wasm-bindgen-backend", "wasm-bindgen-shared", ] From c451a747b421c8b2157aac9ca32de77f9759b01c Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sat, 16 Sep 2023 13:55:28 +0200 Subject: [PATCH 6/7] docs: update release process --- docs/release_process.md | 103 +++++++++++++++++++++------------------- 1 file changed, 55 insertions(+), 48 deletions(-) diff --git a/docs/release_process.md b/docs/release_process.md index 4b5e39b25..1f81aea57 100644 --- a/docs/release_process.md +++ b/docs/release_process.md @@ -1,68 +1,75 @@ -# Torrust Tracker Release Process (v2.1.0-draft) +# Torrust Tracker Release Process (v2.2.0) -The purpose of this document is to describe the release process. +## Version: +> **The `[semantic version]` is bumped according to releases, new features, and breaking changes.** +> +> *The `develop` branch uses the (semantic version) suffix `-develop`.* -## Overview +## Process: -Torrust Tracker is published according to this protocol: +### 1. The `develop` branch is ready for a release. +The `develop` branch should have the version `[semantic version]-develop` that is ready to be released. -0. After release create new pull request into `develop` branch: +### 2. Stage `develop` HEAD for merging into the `main` branch: -- The `develop` branch has the (semantic version) suffix `-develop`. -- The version is bumped according to releases, new features, and breaking changes. +```sh +git fetch --all +git push --force torrust develop:staging/main +``` -- [ ] `develop` is ready for branching for a release. -- [ ] force-push `develop` to `staging/main` branch. -- [ ] commit `release: version (semantic version)`, that removes the `-develop` suffix. -- [ ] create pull request to merge `staging/main` into `main` branch. -- [ ] push `main` branch to `releases/v(semantic version)` branch. -- [ ] check all status checks success for `releases/(semantic version)` branch. -- [ ] create signed `v(semantic version)` tag from `releases/(semantic version) HEAD`. -- [ ] create github release from `v(semantic version)` tag. -- [ ] force-push `main` to `staging/develop` branch. -- [ ] commit `develop: bump version (semantic version)-develop`, that bumps the version and adds the `-develop` suffix. -- [ ] create pull request to merge `staging/develop` into `develop` branch. +### 3. Create Release Commit: -- At step `1.`, `develop` is automatically published to `dockerhub`. -- At step `3.`, `main` is automatically published to `dockerhub`. -- At step `6.`, `releases/v(semantic version)` is automatically published to `dockerhub` and `crate.io`. +```sh +git stash +git switch staging/main +# change `[semantic version]-develop` to `[semantic version]`. +git add -A +git commit -m "release: version [semantic version]" +git push torrust +``` -## Development Branch +### 4. Create and Merge Pull Request from `staging/main` into `main` branch. +This pull request merges the new version into the `main` branch. -The `develop` branch, the default branch for the repository is automatically published to dockerhub with the `develop` label. This process happens automatically when a pull request is merged in, and the `container.yaml` workflow is triggered. +### 5. Push new version from `main` HEAD to `releases/v[semantic version]` branch: -## Main Branch +```sh +git fetch --all +git push torrust main:releases/v[semantic version] +``` -The `main` branch is the staging branch for releases. +> **Check that the deployment is successful!** -A release commit needs to be made that prepares the repository for the release, this commit should include: +### 6. Create Release Tag: -- Changing the semantic version. -- Finalizing the release notes and changelog. +```sh +git switch releases/v[semantic version] +git tag --sign v[semantic version] +git push --tags torrust +``` -The title of the commit should be: `release: version (semantic version)`. +### 7. Create Release on Github from Tag. +This is for those who wish to download the source code. -This commit should be committed upon the head of the development branch, and pushed to the `main` branch. +### 8. Stage `main` HEAD for merging into the `develop` branch: +Merge release back into the develop branch. -Once the release has succeeded, the `main` branch should be merged back into the `develop` branch. +```sh +git fetch --all +git push --force torrust main:staging/develop +``` +### 9. Create Comment that bumps next development version: -## Releases Branch +```sh +git stash +git switch staging/main +# change `[semantic version]` to `(next)[semantic version]-develop`. +git add -A +git commit -m "develop: bump to version (next)[semantic version]-develop" +git push torrust +``` -According to the patten `releases/v(semantic version)`, the `main` branch head is published to here to trigger the deployment workflows. +### 10. Create and Merge Pull Request from `staging/develop` into `develop` branch. +This pull request merges the new release into the `develop` branch and bumps the version number. -The repository deployment environment for crates.io is only available for the `releases/**/*` patten of branches. -Once the publishing workflows have succeeded; we can make the git-tag. - -## Release Tag - -Create a Signed Tag with a short message in the form `v(semantic version)` and push it to the repository. - -## Github Release - -From the newly published tag, create a Github Release using the web-interface. - - -## Merge back into development branch - -After this is all successful, the `main` branch should be merged into the `develop` branch. From dd8675548a122557ca177a5f79fa2b43d105c419 Mon Sep 17 00:00:00 2001 From: Cameron Garnham Date: Sat, 16 Sep 2023 15:10:51 +0200 Subject: [PATCH 7/7] release: version 3.0.0-alpha.9 --- Cargo.lock | 12 ++++++------ Cargo.toml | 12 ++++++------ README.md | 8 ++++---- packages/configuration/Cargo.toml | 4 ++-- packages/test-helpers/Cargo.toml | 4 ++-- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index afb4ef0b8..f85b1dd02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3169,7 +3169,7 @@ dependencies = [ [[package]] name = "torrust-tracker" -version = "3.0.0-alpha.9-develop" +version = "3.0.0-alpha.9" dependencies = [ "aquatic_udp_protocol", "async-trait", @@ -3215,7 +3215,7 @@ dependencies = [ [[package]] name = "torrust-tracker-configuration" -version = "3.0.0-alpha.9-develop" +version = "3.0.0-alpha.9" dependencies = [ "config", "log", @@ -3230,7 +3230,7 @@ dependencies = [ [[package]] name = "torrust-tracker-contrib-bencode" -version = "3.0.0-alpha.9-develop" +version = "3.0.0-alpha.9" dependencies = [ "criterion", "error-chain", @@ -3238,7 +3238,7 @@ dependencies = [ [[package]] name = "torrust-tracker-located-error" -version = "3.0.0-alpha.9-develop" +version = "3.0.0-alpha.9" dependencies = [ "log", "thiserror", @@ -3246,7 +3246,7 @@ dependencies = [ [[package]] name = "torrust-tracker-primitives" -version = "3.0.0-alpha.9-develop" +version = "3.0.0-alpha.9" dependencies = [ "derive_more", "serde", @@ -3254,7 +3254,7 @@ dependencies = [ [[package]] name = "torrust-tracker-test-helpers" -version = "3.0.0-alpha.9-develop" +version = "3.0.0-alpha.9" dependencies = [ "lazy_static", "rand", diff --git a/Cargo.toml b/Cargo.toml index 607ec3adb..f62d45799 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ license-file = "COPYRIGHT" publish = true repository = "https://github.com/torrust/torrust-tracker" rust-version = "1.72" -version = "3.0.0-alpha.9-develop" +version = "3.0.0-alpha.9" [dependencies] aquatic_udp_protocol = "0.8" @@ -56,10 +56,10 @@ serde_json = "1.0" serde_with = "3.2" thiserror = "1.0" tokio = { version = "1.29", features = ["macros", "net", "rt-multi-thread", "signal", "sync"] } -torrust-tracker-configuration = { version = "3.0.0-alpha.9-develop", path = "packages/configuration" } -torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.9-develop", path = "contrib/bencode" } -torrust-tracker-located-error = { version = "3.0.0-alpha.9-develop", path = "packages/located-error" } -torrust-tracker-primitives = { version = "3.0.0-alpha.9-develop", path = "packages/primitives" } +torrust-tracker-configuration = { version = "3.0.0-alpha.9", path = "packages/configuration" } +torrust-tracker-contrib-bencode = { version = "3.0.0-alpha.9", path = "contrib/bencode" } +torrust-tracker-located-error = { version = "3.0.0-alpha.9", path = "packages/located-error" } +torrust-tracker-primitives = { version = "3.0.0-alpha.9", path = "packages/primitives" } tower-http = { version = "0.4", features = ["compression-full"] } uuid = { version = "1", features = ["v4"] } @@ -70,7 +70,7 @@ reqwest = { version = "0.11.18", features = ["json"] } serde_bytes = "0.11" serde_repr = "0.1" serde_urlencoded = "0.7" -torrust-tracker-test-helpers = { version = "3.0.0-alpha.9-develop", path = "packages/test-helpers" } +torrust-tracker-test-helpers = { version = "3.0.0-alpha.9", path = "packages/test-helpers" } [workspace] members = ["contrib/bencode", "packages/configuration", "packages/located-error", "packages/primitives", "packages/test-helpers"] diff --git a/README.md b/README.md index c07c2b7f7..b91a01e93 100644 --- a/README.md +++ b/README.md @@ -179,13 +179,13 @@ This project was a joint effort by [Nautilus Cyberneering GmbH][nautilus] and [D [containers.md]: ./docs/containers.md -[api]: https://docs.rs/torrust-tracker/3.0.0-alpha.9-develop/torrust_tracker/servers/apis/v1 -[http]: https://docs.rs/torrust-tracker/3.0.0-alpha.9-develop/torrust_tracker/servers/http -[udp]: https://docs.rs/torrust-tracker/3.0.0-alpha.9-develop/torrust_tracker/servers/udp +[api]: https://docs.rs/torrust-tracker/3.0.0-alpha.9/torrust_tracker/servers/apis/v1 +[http]: https://docs.rs/torrust-tracker/3.0.0-alpha.9/torrust_tracker/servers/http +[udp]: https://docs.rs/torrust-tracker/3.0.0-alpha.9/torrust_tracker/servers/udp [good first issues]: https://github.com/torrust/torrust-tracker/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 [documentation]: https://docs.rs/torrust-tracker/ -[API documentation]: https://docs.rs/torrust-tracker/3.0.0-alpha.9-develop/torrust_tracker/servers/apis/v1 +[API documentation]: https://docs.rs/torrust-tracker/3.0.0-alpha.9/torrust_tracker/servers/apis/v1 [discussions]: https://github.com/torrust/torrust-tracker/discussions [COPYRIGHT]: ./COPYRIGHT diff --git a/packages/configuration/Cargo.toml b/packages/configuration/Cargo.toml index b9b4c50d8..1ce6a63a4 100644 --- a/packages/configuration/Cargo.toml +++ b/packages/configuration/Cargo.toml @@ -21,8 +21,8 @@ serde = { version = "1.0", features = ["derive"] } serde_with = "3.2" thiserror = "1.0" toml = "0.8" -torrust-tracker-located-error = { version = "3.0.0-alpha.9-develop", path = "../located-error" } -torrust-tracker-primitives = { version = "3.0.0-alpha.9-develop", path = "../primitives" } +torrust-tracker-located-error = { version = "3.0.0-alpha.9", path = "../located-error" } +torrust-tracker-primitives = { version = "3.0.0-alpha.9", path = "../primitives" } [dev-dependencies] uuid = { version = "1", features = ["v4"] } diff --git a/packages/test-helpers/Cargo.toml b/packages/test-helpers/Cargo.toml index e367d07cd..8ecf29676 100644 --- a/packages/test-helpers/Cargo.toml +++ b/packages/test-helpers/Cargo.toml @@ -17,5 +17,5 @@ version.workspace = true [dependencies] lazy_static = "1.4" rand = "0.8.5" -torrust-tracker-configuration = { version = "3.0.0-alpha.9-develop", path = "../configuration" } -torrust-tracker-primitives = { version = "3.0.0-alpha.9-develop", path = "../primitives" } +torrust-tracker-configuration = { version = "3.0.0-alpha.9", path = "../configuration" } +torrust-tracker-primitives = { version = "3.0.0-alpha.9", path = "../primitives" }