forked from masukomi/private_comments
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This change adds some affordances for building private_comments under Linux. Since I could not guarantee that every builder would have all the necessary tools for building, I wrapped the build process into a docker environment. This allows an almost trivial build command line: ``` ./linux/make.release.sh ``` You need to have docker installed for this to be possible, but it might not be a big concession to make for the ease of building. This still requires root access to run Docker (sigh), but doesn't require you to install a whole new runtime if you are only interested in running the binaries. I used shell scripts for this purpose to follow the style established in the repository, though I'd have prefered to use some `make` tool. Issues: masukomi#22
- Loading branch information
Showing
8 changed files
with
92 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ src/*.link | |
.DS_Store | ||
src/*.tgz | ||
src/tests/pc_test_comments_dir/* | ||
bin/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM ubuntu:22.04 as buildenv | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get -y update \ | ||
&& apt-get -y install \ | ||
libchicken-dev \ | ||
chicken-bin \ | ||
build-essential \ | ||
bash | ||
|
||
COPY src/install_chicken_eggs.sh / | ||
RUN chmod a+x /install_chicken_eggs.sh | ||
|
||
RUN /install_chicken_eggs.sh | ||
|
||
VOLUME /src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#! /bin/bash | ||
# Builds a Docker environment for building private_comments. | ||
# Run from the project root: | ||
# ./build/make.buildenv.sh | ||
|
||
docker build -t buildenv -f build/Dockerfile . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#! /bin/bash | ||
|
||
# Builds a release of private_comments. | ||
# Run from the project root. | ||
|
||
set -x | ||
|
||
BUILD_VERSION="${BUILD_VERSION:-}" | ||
|
||
# Building the build environment, since we don't have a good | ||
# spot to place the buildenv container. | ||
./build/make.buildenv.sh | ||
|
||
readonly _script_dir="$(pwd)" | ||
|
||
docker run --interactive --tty \ | ||
-u "$(id -u):$(id -g)" \ | ||
-v "${_script_dir}:/src:rw" \ | ||
buildenv \ | ||
/bin/bash -c "cd /src/src && ./build.sh ${BUILD_VERSION}" |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /bin/bash | ||
set -x | ||
|
||
# Cleans up the build artifacts | ||
# Run in the top level directory. | ||
|
||
rm -vfr *.o *.link | ||
|
||
|