Skip to content

Commit d782020

Browse files
committed
Split the packaging instructions into a separate readme file
1 parent e231f7c commit d782020

File tree

2 files changed

+86
-67
lines changed

2 files changed

+86
-67
lines changed

PACKAGING.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Packaging newdoc
2+
3+
The following are instructions for the maintainers of `newdoc` to package and distribute new releases.
4+
5+
## Packaging and distributing newdoc as an RPM package
6+
7+
1. Install the `cargo` package manager. For details, see <https://rustup.rs/>.
8+
9+
2. Install the `cargo-rpm` extension:
10+
11+
```
12+
$ cargo install cargo-rpm
13+
```
14+
15+
3. In the `newdoc` project directory, build RPM packages:
16+
17+
```
18+
$ cargo rpm build
19+
```
20+
21+
This command build packages in the `target/release/rpmbuild/` directory.
22+
23+
4. Log into the Copr repository administration: <https://copr.fedorainfracloud.org/coprs/mareksu/newdoc-rs/>.
24+
25+
5. Go to the **Builds** tab.
26+
27+
6. Click **New Build** and select **Upload**.
28+
29+
7. In the **Provide the source** section, upload the most recent SRPM package from the `target/release/rpmbuild/SRPMS/` directory.
30+
31+
8. Click **Build**.
32+
33+
## Packaging and distributing newdoc on Crates.io
34+
35+
1. If you are publishing to Crates.io for teh first time on this system, log into your account:
36+
37+
```
38+
$ cargo login
39+
```
40+
41+
You can manage your login tokens in your account settings: <https://crates.io/me>.
42+
43+
2. Publish the latest version of `newdoc` to Crates.io:
44+
45+
```
46+
$ cargo publish
47+
```
48+
49+
50+
## Packaging and distributing newdoc as a Docker image
51+
52+
Note: The following steps might be sub-optimal. Feel free to suggest improvements.
53+
54+
1. Install the `docker` or `podman` tool.
55+
56+
If you use `podman`, replace `docker` with `podman` in the following commands.
57+
58+
2. Log into the Docker Hub account:
59+
60+
```
61+
$ docker login --username mrksu docker.io
62+
```
63+
64+
3. Build a new image. For example:
65+
66+
```
67+
$ docker build -t mrksu/newdoc:v2.3.3 .
68+
```
69+
70+
4. Find the Image ID of the built image:
71+
72+
```
73+
$ docker images
74+
```
75+
76+
5. Tag the new version. For example:
77+
78+
```
79+
$ docker tag 390e73cb470d mrksu/newdoc:v2.3.3
80+
```
81+
82+
6. Upload the new image:
83+
84+
```
85+
$ docker push mrksu/newdoc:v2.3.3
86+
```

README.md

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -126,73 +126,6 @@ $ newdoc --help
126126
You can find a brief change log on the [Releases](https://github.com/redhat-documentation/newdoc/releases) page.
127127
128128
129-
## Packaging and distributing newdoc as an RPM
130-
131-
1. Install the `cargo` package manager. For details, see <https://rustup.rs/>.
132-
133-
2. Install the `cargo-rpm` extension:
134-
135-
```
136-
$ cargo install cargo-rpm
137-
```
138-
139-
3. In the `newdoc` project directory, build RPM packages:
140-
141-
```
142-
$ cargo rpm build
143-
```
144-
145-
This command build packages in the `target/release/rpmbuild/` directory.
146-
147-
4. Log into the Copr repository administration: <https://copr.fedorainfracloud.org/coprs/mareksu/newdoc-rs/>.
148-
149-
5. Go to the **Builds** tab.
150-
151-
6. Click **New Build** and select **Upload**.
152-
153-
7. In the **Provide the source** section, upload the most recent SRPM package from the `target/release/rpmbuild/SRPMS/` directory.
154-
155-
8. Click **Build**.
156-
157-
158-
## Packaging and distributing newdoc as a Docker image
159-
160-
Note: The following steps might be sub-optimal. Feel free to suggest improvements.
161-
162-
1. Install the `docker` or `podman` tool.
163-
164-
If you use `podman`, replace `docker` with `podman` in the following commands.
165-
166-
2. Log into the Docker Hub account:
167-
168-
```
169-
$ docker login --username mrksu docker.io
170-
```
171-
172-
3. Build a new image. For example:
173-
174-
```
175-
$ docker build -t mrksu/newdoc:v2.3.3 .
176-
```
177-
178-
4. Find the Image ID of the built image:
179-
180-
```
181-
$ docker images
182-
```
183-
184-
5. Tag the new version. For example:
185-
186-
```
187-
$ docker tag 390e73cb470d mrksu/newdoc:v2.3.3
188-
```
189-
190-
6. Upload the new image:
191-
192-
```
193-
$ docker push mrksu/newdoc:v2.3.3
194-
```
195-
196129
## Additional resources
197130
198131
* The `newdoc --help` command

0 commit comments

Comments
 (0)