summaryrefslogtreecommitdiffstats
path: root/Rakefile
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2012-09-10 18:09:44 +0200
committerTails developers <amnesia@boum.org>2012-09-10 18:09:44 +0200
commit315fae4280762ee6542bb3792657c2f701b88040 (patch)
treea484fa4748262e7aa6a1c4056af99d3b1632df08 /Rakefile
parent14b17bf35c1507db23ddcc45d845004a81f8685f (diff)
vagrant: don't use gzip compression when building from a tag.
Also chomp all shell output. I don't think the previous check ever worked since branch_name would get a '\n' on the end.
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/Rakefile b/Rakefile
index 3c9fe33..142f528 100644
--- a/Rakefile
+++ b/Rakefile
@@ -66,9 +66,10 @@ def enough_free_memory?
end
end
-def stable_branch?
+def is_release?
branch_name = `git name-rev --name-only HEAD`
- STABLE_BRANCH_NAMES.include? branch_name
+ tag_name = `git describe --exact-match HEAD 2> /dev/null`
+ STABLE_BRANCH_NAMES.include? branch_name.chomp or tag_name.chomp.length > 0
end
def system_cpus
@@ -94,7 +95,7 @@ task :parse_build_options do
options += 'cache '
# Default to fast compression on development branches
- options += 'gzipcomp ' unless stable_branch?
+ options += 'gzipcomp ' unless is_release?
# Default to the number of system CPUs when we can figure it out
cpus = system_cpus