Skip to content

Commit

Permalink
Add documentation for packaging releases.
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cattermole committed Dec 28, 2023
1 parent e31912a commit 057d2d4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
19 changes: 19 additions & 0 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,25 @@ $ cargo build --release
Timetracker (currently) only works on Linux and requires the X11 and
XScreenSaver (Xss) libraries to be installed on the running computer.

# Packaging For Release

The Timetracker binaries can be packaged up in a .zip file, for users
to easily download and install.

To build Timetracker (with maximum performance), use the Rust package
manager Cargo:
```bash
$ cd /path/to/timetracker
$ cargo build --all --release
```

Now create a ZIP file with the binaries:
```bash
$ cd /path/to/timetracker
$ cd target/release/ # assumes the default target directory.
$ zip ../../timetracker-v0.0.0.zip timetracker-dump timetracker-configure timetracker-print timetracker-recorder
```

## Testing

Run the Timetracker test suite with 'cargo test':
Expand Down
8 changes: 7 additions & 1 deletion Dockerfile_centos7
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@
# $ cargo test
# $ cargo build --all --release
#
# To package the resulting binaries for release to users:
# $ cd target/release/
# $ zip timetracker-v0.0.0.zip timetracker-print timetracker-recorder timetracker-dump timetracker-configure
#

FROM centos:7

# GCC (C++ compiler), Gnome Toolkit (GTK) and X11 dependencies.
# 'zip' is installed for packaging.
RUN yum install --assumeyes \
gcc \
glib2 \
Expand All @@ -24,7 +29,8 @@ RUN yum install --assumeyes \
libX11 \
libX11-devel \
libXScrnSaver \
libXScrnSaver-devel
libXScrnSaver-devel \
zip

# Install latest stable Rust with 'rustup'.
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y \
Expand Down

0 comments on commit 057d2d4

Please sign in to comment.