Skip to content

Commit

Permalink
Merge pull request #3392 from webern/twoliter-skip-install
Browse files Browse the repository at this point in the history
build: allow skipping of twoliter install
  • Loading branch information
webern authored Aug 31, 2023
2 parents 84d3606 + a031d91 commit 8d7558f
Showing 1 changed file with 12 additions and 0 deletions.
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

0 comments on commit 8d7558f

Please sign in to comment.