Skip to content

Commit a42840e

Browse files
authored
Consolidate release script (#6)
* Move Dockerfile to project root * Move scripts to a new "Scripts" folder * Use set -euo pipefail instead of || exit 1 on most lines * Get the release name from git * Use "rls" instead of "release" in the file name of deliverables * Test for internet connection, if it fails disable parts of the script that require an internet connection. * Work out of a git clone in /reactos directory instead of /work * Put deliverables in a separate folder (good if we want more deliverables in the future for different architectures) * Consolidate script a ton, only needing to git checkout {branch} and running release to build all deliverables * Update README.md * Have the Docker image pull scripts from the local repository rather than downloading from git (so you can work on the image locally easier)
1 parent 37a51d5 commit a42840e

8 files changed

Lines changed: 177 additions & 210 deletions

File tree

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: mr-smithers-excellent/docker-build-push@v6
1818
with:
1919
image: rosbe-unix-release-engineering
20-
dockerfile: Docker/Dockerfile
20+
dockerfile: Dockerfile
2121
registry: ghcr.io
2222
addLatest: true
2323
username: ${{ github.actor }}

Docker/README.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

Docker/Dockerfile renamed to Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM ubuntu:24.04
2-
LABEL org.opencontainers.image.authors="Mark Jansen <mark.jansen@reactos.org>"
2+
LABEL org.opencontainers.image.authors="Mark Jansen <mark.jansen@reactos.org>, Carl Bialorucki <carl.bialorucki@reactos.org>"
33
LABEL Description="RosBE-Unix on Ubuntu with Release Engineering scripts"
44

55
WORKDIR /work
@@ -31,8 +31,8 @@ RUN wget https://downloads.sourceforge.net/reactos/RosBE-Unix-2.2.1.tar.bz2 \
3131
&& cd .. \
3232
&& rm -rf RosBE-Unix-2.2.1
3333

34-
RUN git clone https://github.com/reactos/Release_Engineering \
35-
&& mv Release_Engineering/Release_* /usr/local/bin \
36-
&& rm -rf Release_Engineering
34+
COPY Scripts/* /usr/local/bin
3735

38-
CMD ["/usr/local/RosBE/RosBE.sh", "/work"]
36+
RUN git clone https://github.com/reactos/reactos.git /reactos
37+
38+
CMD ["/usr/local/RosBE/RosBE.sh", "/reactos"]

README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,43 @@
22

33
This repository contains the scripts used to create ReactOS release images.
44

5-
The docker image is created from the [Docker](Docker) folder.
5+
## Building a release using Docker
6+
You can build ReactOS releases locally in three easy steps, assuming you have Docker Desktop installed.
7+
8+
#### 1. Building the container
9+
Clone this git repository and `cd` into it. From the root of the repository, run the commands below. This will create a Docker image called `reactos-base` and a Docker container called `reactos-builder`.
10+
11+
```bash
12+
docker build -t reactos-base .
13+
docker run --name reactos-builder -it reactos-base
14+
```
15+
Your container will now be set up and your terminal will be connected to it. To disconnect from the container, run `exit`.
16+
17+
If you disconnect from your container, you can reconnect to it using this command:
18+
```bash
19+
docker start -ai reactos-builder
20+
```
21+
22+
#### 2. Building release deliverables
23+
Once you connect to your container, you will be in the `/reactos` directory. This contains a git clone of the ReactOS repository. To build release deliverables, simply checkout the branch with the release you want to make and run `release`.
24+
```bash
25+
git checkout {release branch}
26+
release
27+
```
28+
The release script will handle fetching the latest commits from origin, downloading optional modules, building ReactOS, and creating the deliverables. When there is no internet connection, the release script is smart enough to continue if optional modules were downloaded previously and warn about not fetching from origin.
29+
30+
#### 3. Copying the deliverables
31+
When complete, the release script will display a message similar to this:
32+
33+
```
34+
*******************************************************************************
35+
Successfully created the following packages:
36+
/reactos/deliverables/ReactOS-0.4.16-dev-2669-i386.zip
37+
/reactos/deliverables/ReactOS-0.4.16-dev-2669-src.zip
38+
*******************************************************************************
39+
```
40+
41+
Simply copy the release deliverables from the `/reactos/deliverables` folder to your computer to use them as needed. You can copy them from the container using Docker Desktop's graphical interface, or you can use the Docker command line interface. For example, this will copy the contents of `/reactos/deliverables` to the current working directory if your container name is `reactos-builder`:
42+
```bash
43+
docker cp reactos-builder:/reactos/deliverables/. .
44+
```

Release_Configure

Lines changed: 0 additions & 65 deletions
This file was deleted.

Release_ISOs

Lines changed: 0 additions & 72 deletions
This file was deleted.

Release_Source

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)