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
  • Loading branch information
mkristian committed Apr 3, 2018
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
Expand Up @@ -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',
Expand Down

0 comments on commit 232047b

Please sign in to comment.