Skip to content

Commit

Permalink
Don’t hardcode the name of the project directory in source tarball bu…
Browse files Browse the repository at this point in the history
…ild.
  • Loading branch information
Quintus committed Jun 2, 2015
1 parent d05ddf9 commit 969daf9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tsc/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,16 @@ desc "Create source tarball."
task :tarball => :clobber do
version = ENV["VERSION"] || "#{TSC_VERSION_MAJOR}.#{TSC_VERSION_MINOR}.#{TSC_VERSION_PATCH}"
puts "Packaging TSC version #{version}"
sleep 1

sh "git submodule init"
sh "git submodule update"

project_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
cd "../.." do
ln_s "TSC", "TSC-#{version}" unless File.exist?("TSC-#{version}")
ln_s project_dir, "TSC-#{version}" unless File.exist?("TSC-#{version}")
sh "tar --exclude .git --exclude drafts -cvJhf TSC-#{version}.tar.xz TSC-#{version}"
rm "TSC-#{version}"
end
end

Expand Down Expand Up @@ -183,7 +186,7 @@ task :release do
source_tarball = File.join(Dir.pwd, "..", "..", "TSC-#{version}.tar.xz")

unless File.file?(source_tarball)
raise "Something went wrong. There is no source tarball at '#{source_tarball}'."
raise "Something went wrong. There is no source tarball at '#{source_tarball}'. You should run `$ rake tarball' probably?"
end

mkdir targetpath
Expand Down

0 comments on commit 969daf9

Please sign in to comment.