Hi Philip.
Your example was just what I needed - thank you. I ended up with the
following. Each test-support folder contains files that need to be executable.
The first 'from' excludes the files in test-support folders so the second
'from' can pick them up and assign the fileMode appropriately.
myfiles = copySpec {
from('../component-interface-tests') {
include('integration-tests/**')
include('README')
exclude('**/test-support/**')
}
from('../component-interface-tests') {
fileMode = 0755
include('**/test-support/**')
}
}
task tar(type: Tar) {
with myfiles
compression = 'GZIP'
}
Thanks again,
Richard.
From: Philip Crotwell [mailto:[email protected]]
Sent: Tuesday, October 11, 2011 11:41 AM
To: [email protected]
Subject: Re: [gradle-user] how do I preserve or even set file permissions in
Tar task?
I have scripts that preserve executable permissions within a tar, so it can
work. I am not sure what would be different in your setup, but something like
this seems to work for me. Typing from memory, so might be some errors...
Philip
myfile = copySpec {
from('component-interface-tests') {
fileMode=0755
include('test-support/**')
}
from('component-interface-tests') {
include('integration-tests/**')
include('README')
}
}
task tar (type: Tar) {
with myfiles
}
2011/10/11 Richard Miehe <[email protected]>
I have a directory that has executable scripts that I need to archive up. I
was initially doing this as a jar, but jar's don't include any permissions.
I switched to the following which does create a tar archive, but does not
preserve the files' original permissions.
task tar (type: Tar) {
from fileTree('component-interface-tests')
}
I see there is an open issue (http://issues.gradle.org/browse/GRADLE-673), but
the workaround doesn't seem to work with milestone 3.
Does anyone have an example of that I could bundle the following directories
and files? In my case, only the files in test-support directory need to have
executable permission.
component-interface-tests/
├── README
├── integration-tests
│ ├── component1
│ ├── 1.0.2
│ ├── S-61
│ │ └── 61.data
│ ├── S-64
│ ├── 64a.data
│ └── 64b.data
└── test-support
├── setup.sh
├── reset.sh
└── whatever.sh
Thanks,
Richard.
Richard Miehe
Software Dev in Test
OnAir
2013 4th Avenue, Suite 400
Seattle, WA 98121 USA
www.onair.aero
OnAir. Stay connected.
Please consider the environment - do you really need to print this email?
________________________________________
Disclaimer: This e-mail (and any attachments to it) is confidential and
intended solely for the named person/s to whom it is addressed. If you are not
an intended recipient, please notify us immediately and delete the email from
your system. Any review, dissemination or other use of it in these
circumstances is prohibited.
Disclaimer: This e-mail (and any attachments to it) is confidential and
intended solely for the named person/s to whom it is addressed. If you are not
an intended recipient, please notify us immediately and delete the email from
your system. Any review, dissemination or other use of it in these
circumstances is prohibited.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email