Skip to content

Commit

Permalink
docs: document Gitea releases (#1076)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoIeni committed Nov 13, 2023
1 parent 9b3ecd3 commit d205273
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/release_plz/tests/all/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async fn release_plz_adds_changelog_on_new_project() {
.gitea
.changed_files_in_pr(opened_prs[0].number)
.await;
assert_eq!(changed_files.len(), 1,);
assert_eq!(changed_files.len(), 1);
assert_eq!(changed_files[0].filename, "CHANGELOG.md");
}

Expand Down
2 changes: 1 addition & 1 deletion crates/release_plz_core/src/next_ver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ fn is_library(package: &Package) -> bool {
pub fn copy_to_temp_dir(target: &Path) -> anyhow::Result<TempDir> {
let tmp_dir = tempdir().context("cannot create temporary directory")?;
copy_dir(target, tmp_dir.as_ref())
.with_context(|| format!("cannot copy directory {target:?} to {tmp_dir:?}",))?;
.with_context(|| format!("cannot copy directory {target:?} to {tmp_dir:?}"))?;
Ok(tmp_dir)
}

Expand Down
4 changes: 2 additions & 2 deletions crates/release_plz_core/src/repo_url.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ impl RepoUrl {
if prev_tag == new_tag {
format!("{host}/releases/tag/{new_tag}")
} else {
format!("{host}/compare/{prev_tag}...{new_tag}",)
format!("{host}/compare/{prev_tag}...{new_tag}")
}
}

pub fn git_pr_link(&self) -> String {
let host = format!("https://{}/{}/{}", self.host, self.owner, self.name);
let pull_path = if self.is_on_github() { "pull" } else { "pulls" };
format!("{host}/{pull_path}",)
format!("{host}/{pull_path}")
}

pub fn gitea_api_url(&self) -> String {
Expand Down
8 changes: 7 additions & 1 deletion website/docs/usage/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ For every release, release-plz:

- Creates a git tag named `<package_name>-v<version>` (e.g. `tokio-v1.8.1`).
- Publishes the package to the cargo registry by running `cargo publish`.
- Publishes a GitHub/Gitea release based on the git tag.
- Publishes a GitHub/Gitea/GitLab release based on the git tag.

In the tag name, `<package_name>-` is omitted if there's only one
package to publish (i.e. with `publish != false` in the `Cargo.toml` file).
Expand Down Expand Up @@ -41,3 +41,9 @@ The permissions you need are:
Then you can run `release-plz release` in Gitlab CI with the following arguments:

`release-plz release --backend gitlab --git-token <gitlab application token>`

## Gitea

`releases-plz` also supports creating releases on Gitea with the `--backend gitea` option.

TODO: document how to create a token on Gitea.
2 changes: 1 addition & 1 deletion website/docs/usage/shell-completion.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Shell completion
# shell-completion

In the following, you can find instructions on how to generate release-plz command completions for
each shell.
Expand Down
4 changes: 2 additions & 2 deletions website/docs/usage/update.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Update
# update

The `release-plz update` command updates the version and the changelog of the
packages of a local workspace.
packages containing unreleased changes.

The command:

Expand Down

0 comments on commit d205273

Please sign in to comment.