summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2020-02-21 11:41:35 +0100
committersegfault <segfault@riseup.net>2020-02-21 11:41:35 +0100
commit7951787568f5229d0481c9432742c7f5be43d940 (patch)
treeb032b9c9a282ea3580f6d97bbd271484fabcc67f
parent96f9755fb39fdf4ee94634e9e1a2957ada4d5852 (diff)
parent6a024a3d0c723cbe72fe7fd62c58acb99c8599cc (diff)
Merge branch 'feature/17439-enable-cachewebsite-by-default' into stable (Closes: #17439)
-rw-r--r--Rakefile15
-rw-r--r--wiki/src/contribute/build.mdwn11
2 files changed, 20 insertions, 6 deletions
diff --git a/Rakefile b/Rakefile
index 529197c..4e453b3 100644
--- a/Rakefile
+++ b/Rakefile
@@ -59,6 +59,8 @@ ENV['ARTIFACTS'] ||= '.'
ENV['APT_SNAPSHOTS_SERIALS'] ||= ''
+ENV['TAILS_WEBSITE_CACHE'] = '1'
+
class CommandError < StandardError
attr_reader :status, :stderr
@@ -247,12 +249,21 @@ task :parse_build_options do
ENV['TAILS_PROXY_TYPE'] = 'noproxy'
when 'offline'
ENV['TAILS_OFFLINE_MODE'] = '1'
- when 'cachewebsite'
+ when /cachewebsite(?:=([a-z]+))?/
+ value = $1
if is_release?
$stderr.puts "Building a release ⇒ ignoring #{opt} build option"
ENV['TAILS_WEBSITE_CACHE'] = '0'
else
- ENV['TAILS_WEBSITE_CACHE'] = '1'
+ value = 'yes' if value.nil?
+ case value
+ when 'yes'
+ ENV['TAILS_WEBSITE_CACHE'] = '1'
+ when 'no'
+ ENV['TAILS_WEBSITE_CACHE'] = '0'
+ else
+ raise "Unsupported value for cachewebsite option: #{value}"
+ end
end
# SquashFS compression settings
when 'fastcomp', 'gzipcomp'
diff --git a/wiki/src/contribute/build.mdwn b/wiki/src/contribute/build.mdwn
index 6917b9a..b3a3a2c 100644
--- a/wiki/src/contribute/build.mdwn
+++ b/wiki/src/contribute/build.mdwn
@@ -113,7 +113,7 @@ You can customize the build system using two environment variables:
For example, you can speed up the build by setting:
- export TAILS_BUILD_OPTIONS="ram fastcomp cachewebsite"
+ export TAILS_BUILD_OPTIONS="ram fastcomp"
This will force the build to happen in RAM and SquashFS compression
will be done using faster, though less efficient size-wise, settings.
@@ -202,9 +202,12 @@ affect reproducibility of the ISO image:
* **rescue**: implies **keeprunning** and will also not clean up the
build directory, which is useful for investigating build failures.
- * **cachewebsite**: enable caching of the built website.
- The cache is keyed on the input parameters that primarily determine
- the output of the website build.
+ * **cachewebsite=**:
+ - If set to "yes" (the default, unless building from a tag), enable caching
+ of the built website. The cache is keyed on the input parameters that
+ primarily determine the output of the website build.
+ - If set to "no", (the default when building from a tag), build the website
+ from scratch.
## HTTP proxy settings