Skip to content
This repository has been archived by the owner on Nov 24, 2021. It is now read-only.

Commit

Permalink
Fixes #11666: Cleanup _build and pkg directories between runs
Browse files Browse the repository at this point in the history
Successive runs of the rake task that generates package tarballs
did not remove or overwrite the previous builds. In a local or CI
environment, the tarball built could unknowingly result in no
updates and a stale package.
  • Loading branch information
ehelms committed Sep 2, 2015
1 parent b837326 commit 15650b1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Rakefile
@@ -1,3 +1,5 @@
require 'rake/clean'

BUILDDIR = File.expand_path(ENV['BUILDDIR'] || '_build')
PKGDIR = ENV['PKGDIR'] || File.expand_path('pkg')

Expand All @@ -19,7 +21,7 @@ end

namespace :pkg do
desc 'Generate package source tar.bz2'
task :generate_source => [PKGDIR, "#{BUILDDIR}/modules"] do
task :generate_source => [:clean, PKGDIR, "#{BUILDDIR}/modules"] do

version = File.read('VERSION').chomp
raise "can't read VERSION" if version.length == 0
Expand All @@ -34,4 +36,6 @@ namespace :pkg do
end
end

CLEAN.include(BUILDDIR, PKGDIR)

task :default => ['pkg:generate_source']

0 comments on commit 15650b1

Please sign in to comment.