Skip to content

Commit

Permalink
use git archive to create tar.gz files directly
Browse files Browse the repository at this point in the history
mkristian committed Apr 3, 2018

Verified

This commit was signed with the committer’s verified signature.
headius Charles Oliver Nutter
1 parent 682626e commit 232047b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions maven/jruby-dist/pom.rb
Original file line number Diff line number Diff line change
@@ -115,13 +115,11 @@
basefile = "#{ctx.project.build.directory}/#{ctx.project.artifactId}-#{ctx.project.version}-src"

FileUtils.cd( File.join( ctx.project.basedir.to_s, '..', '..' ) ) do
[ 'tar', 'zip' ].each do |format|
[ 'tar.gz', 'zip' ].each do |format|
puts "create #{basefile}.#{format}"
system( "git archive --prefix 'jruby-#{ctx.project.version}/' --format #{format} #{revision} . -o #{basefile}.#{format}" ) || raise( "error creating #{format}-file" )
end
end
puts "zipping #{basefile}.tar"
system( "gzip #{basefile}.tar -f" ) || raise( "error zipping #{basefile}.tar" )
end
plugin 'org.codehaus.mojo:build-helper-maven-plugin' do
execute_goal( 'attach-artifact',

0 comments on commit 232047b

Please sign in to comment.