Closed ghost closed 10 years ago
I've tested you configuration but I can't yet see a problem. Can you tell me which version are you using? Also can you also please add the output you get when you run grunt with --verbose.
The output in OP is with --verbose
. It seems to have trouble understanding 2 brackets separated with a comma. You are able to use them ?
I'm on 0.1.7 installed through "npm install" as a dependencie in my main folder.
I was able to build a deb if I use only 1 par of brackets, not two. But I'd like to install my program in /opt and a desktop file in /usr/share/applications
I could work things out if I could get access to a postinstall script, I think.
Let me take a look at this issue in more detail, I did copy the syntax you used and it seemed to work but the first src didn't actually match local files as I used your exact syntax build/cache/linux64/0.9.2/.... I'll try again with something more realistic later today...
In general I believe postinstall scripts are considered bast practice for things like that. This is because when you query the package for example using
dpkg -c prefix-package_name-postfix-2.0.0-1.deb
or
dpkg -L prefix-package_name-postfix
you don't see the extra file install during the postinstall script.
If required I can also add support for scripts such as postinstall.
A more accurate representation of what I want to do :
debian_package: {
options: {
maintainer: {
name: "App Team",
email: "mail@mail.com"
},
name: "app-name", //dpkg doesn't accept uppercase, space or underscore
long_description: "BLABLABLABLABLABLA.",
},
files:
{
src: [
'build/test.sh',
'build/test2.sh',
],
dest: '/opt/app-name/'
},
{
src: 'dist/app-name.desktop',
dest: '/usr/share/app-name.desktop'
}
}
Which version are you running as I can't see to reproduce the error you are having, can you double check you are running 0.1.8 ?
I was on 1.7 but I switched to my own bash script now^^
I don't quite understand why you are having an issue because I specifically have tests that cover the following two scenarios:
files: [
{
src: 'tasks/debian_package.js',
dest: '/var/www/tasks/debian_package.js'
}
]
and
files: [
{
expand: true,
cwd: 'tasks',
src: [
'**/*.js'
],
dest: '/var/www/tasks'
},
{
src: [
'tests/custom_options/packaging/debian/changelog',
'tests/custom_options/packaging/debian/control'
],
dest: '/var/www/'
}
]
Which covers all the examples you specified?
I guess you noticed in the last example you provided the [ and ] where missing from the files: section?
I'm going to close the issue as there as there are tests that cover these scenarios and I can't reproduce this, please let me know if you still have problems and I can re-open the issue.
okay that was simply that. Thanks, idk how I did not saw that... Stupid me x)
I know this issue is closed, but thought I'd provide some more info that may be helpful for anyone running into this. I think the problem OP was having was that they needed an extra level in the hierarchy, this should do the trick:
debian_package: {
dist: {
options: {
maintainer: {
name: "App Team",
email: "mail@mail.com"
},
name: "app-name", //dpkg doesn't accept uppercase, space or underscore
long_description: "BLABLABLABLABLABLA.",
},
files: [
{
src: [
'build/test.sh',
'build/test2.sh',
],
dest: '/opt/app-name/'
},
{
src: 'dist/app-name.desktop',
dest: '/usr/share/app-name.desktop'
}
]
}
}
grunt debian_package:dist would then run the task. (https://github.com/alexluke/grunt-haml-php/issues/5 had similar problem)
Hello,
I can't seem to use :
Output is :