Skip to content

Commit 7ca18c0

Browse files
author
Marek Suchánek
committed
Add instructions to tag versions and update Homebrew
1 parent 7e3a88a commit 7ca18c0

File tree

2 files changed

+67
-3
lines changed

2 files changed

+67
-3
lines changed

PACKAGING.md

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,47 @@
22

33
The following are instructions for the maintainers of `newdoc` to package and distribute new releases.
44

5+
6+
## Preparing a new version
7+
8+
1. Update newdoc dependencies:
9+
10+
```
11+
$ cargo update
12+
```
13+
14+
2. Make your changes to the code and merge them to the `main` branch.
15+
16+
3. Update the version number in `Cargo.toml` and `newdoc.spec`. The versions must be identical.
17+
18+
4. Commit the version update:
19+
20+
```
21+
$ git commit -am "Update the version to X.Y.Z"
22+
```
23+
24+
5. Tag the latest commit with the new version number:
25+
26+
```
27+
$ git tag -a vX.Y.Z -m "Version X.Y.Z"
28+
```
29+
30+
Make sure to prefix the version in the tag name with "v" for "version".
31+
32+
6. Push the version tag to the remote repository:
33+
34+
```
35+
$ git push --follow-tags
36+
```
37+
38+
If you're using several remote repositories, such as origin and upstream, make sure to push the tag to all of them.
39+
40+
541
## Packaging and distributing newdoc as an RPM package
642
7-
1. Log into the Copr repository administration: <https://copr.fedorainfracloud.org/coprs/mareksu/newdoc-rs/>.
43+
1. Log into the Copr repository administration.
44+
45+
Currently, newdoc is packaged in the [mareksu/newdoc-rs](https://copr.fedorainfracloud.org/coprs/mareksu/newdoc-rs/) repository.
846
947
2. Go to the **Builds** tab.
1048
@@ -18,6 +56,32 @@ The following are instructions for the maintainers of `newdoc` to package and di
1856
1957
7. Click **Build**.
2058
59+
60+
## Packaging and distributing newdoc with Homebrew
61+
62+
1. Make sure you have access to the existing Homebrew repository.
63+
64+
Currently, newdoc is packaged in [msuchane/homebrew-repo](https://github.com/redhat-documentation/homebrew-repo), but a fork at [redhat-documentation/homebrew-repo](https://github.com/redhat-documentation/homebrew-repo) is also available.
65+
66+
2. Download the `.tar.gz` archive that Github created for your latest tagged version:
67+
68+
<https://github.com/redhat-documentation/newdoc/tags>
69+
70+
3. Calculate the SHA256 checksum of this archive:
71+
72+
```
73+
$ sha256sum vX.Y.Z.tar.gz
74+
```
75+
76+
4. In the `homebrew-repo` repository, edit the `Formula/newdoc.rb` file.
77+
78+
5. In the `url` attribute, update the version in the URL to your latest version.
79+
80+
6. In the `sha256` attribute, replace the existing checksum with the new checksum that you calculated.
81+
82+
7. Commit and push the changes.
83+
84+
2185
## Packaging and distributing newdoc on Crates.io
2286
2387
1. If you are publishing to Crates.io for the first time on this system, log into your account:

newdoc.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ License: GPLv3+
66
URL: https://github.com/redhat-documentation/newdoc
77
Group: Applications/Text
88
Obsoletes: python3-newdoc, python2-newdoc
9-
Source0: https://static.crates.io/crates/%{name}/%{name}-%{version}.crate
10-
#Source1: https://github.com/redhat-documentation/%{name}/archive/refs/tags/v%{version}.tar.gz
9+
#Source0: https://static.crates.io/crates/%{name}/%{name}-%{version}.crate
10+
Source0: https://github.com/redhat-documentation/%{name}/archive/refs/tags/v%{version}.tar.gz
1111

1212
# This works fine with Fedora and RHEL, but breaks the SUSE build:
1313
# ExclusiveArch: %{rust_arches}

0 commit comments

Comments
 (0)