Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: allow skipping of twoliter install #3392

Merged
merged 1 commit into from
Aug 31, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ skip_core_tasks = true

[env]
BUILDSYS_ROOT_DIR = "${CARGO_MAKE_WORKING_DIRECTORY}"
# The build tool, Twoliter, needs to be installed to run a Bottlerocket build.
# If you need to build in an offline environment, first you should run `cargo
# make fetch` in an online environment. Subsequently in the offline environment
# you need to set this to true. `cargo make -e TWOLITER_SKIP_INSTALL=true build`
TWOLITER_SKIP_INSTALL = "false"
# TODO - replace with crates.io version when published
TWOLITER_GIT = "https://github.com/bottlerocket-os/twoliter"
TWOLITER_REV = "v0.0.2"
Expand Down Expand Up @@ -242,8 +247,15 @@ fi
] }

[tasks.install-twoliter]
script_runner = "bash"
script = [
'''
if [ "${TWOLITER_SKIP_INSTALL}" = "true" ]; then
echo "TWOLITER_SKIP_INSTALL=${TWOLITER_SKIP_INSTALL}"
echo "Skipping Twoliter installation"
exit 0
fi

cargo install \
--locked \
--root "${TWOLITER_INSTALL_ROOT}" \
Expand Down