Commit 3f085893 authored by Tails developers's avatar Tails developers

vagrant: Add support for clean-up build settings

As we now cache ikiwiki's work between builds, we add an option to force an
initial clean-up.
parent 90abd5de
......@@ -28,7 +28,7 @@ require 'tails_build_settings'
VAGRANT_PATH = File.expand_path('../vagrant', __FILE__)
# Environment variables that will be exported to the build script
EXPORTED_VARIABLES = ['http_proxy', 'MKSQUASHFS_OPTIONS', 'TAILS_RAM_BUILD']
EXPORTED_VARIABLES = ['http_proxy', 'MKSQUASHFS_OPTIONS', 'TAILS_RAM_BUILD', 'TAILS_CLEAN_BUILD']
# Let's save the http_proxy set before playing with it
EXTERNAL_HTTP_PROXY = ENV['http_proxy']
......@@ -67,6 +67,9 @@ task :parse_build_options do
ENV['MKSQUASHFS_OPTIONS'] = '-comp gzip'
when 'defaultcomp'
ENV['MKSQUASHFS_OPTIONS'] = nil
# Clean-up settings
when 'cleanall'
ENV['TAILS_CLEAN_BUILD'] = '1'
end
end
end
......
......@@ -37,6 +37,9 @@ git fetch origin
as_root_do git checkout --force "$REV"
as_root_do git reset --hard "$COMMIT"
if [ "$TAILS_CLEAN_BUILD" ]; then
as_root_do lb clean --all
fi
as_root_do ./build-wiki
BUILD_DIR=$(mktemp -d /home/vagrant/tails-build.XXXXXXXX)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment