-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
86 lines (84 loc) · 3.92 KB
/
Gruntfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
module.exports = function(grunt) {
grunt.initConfig({
shell: {
generateZip: {
command:
'cp afterpayofficial.zip afterpayofficial-$(git rev-parse --abbrev-ref HEAD).zip \n'
},
autoindex: {
command:
'composer global require pagantis/autoindex \n' +
'php ~/.composer/vendor/pagantis/autoindex/index.php ./ || true \n' +
'php /home/circleci/.config/composer/vendor/pagantis/autoindex/index.php . || true \n'
},
composerProd: {
command: 'composer install --no-dev'
},
composerDev: {
command: 'composer install --ignore-platform-reqs'
},
runTestPrestashop17: {
command:
'docker-compose down\n' +
'docker-compose up -d selenium\n' +
'docker-compose up -d prestashop17-test\n' +
'echo "Creating the prestashop17-test"\n' +
'sleep 100\n' +
'date\n' +
'docker-compose logs prestashop17-test\n' +
'set -e\n' +
'vendor/bin/phpunit --group prestashop17basic\n'
},
runTestPrestashop16: {
command:
'docker-compose down\n' +
'docker-compose up -d selenium\n' +
'docker-compose up -d prestashop16-test\n' +
'echo "Creating the prestashop16-test"\n' +
'sleep 90\n' +
'date\n' +
'docker-compose logs prestashop16-test\n' +
'set -e\n' +
'vendor/bin/phpunit --group prestashop16basic\n'
},
},
compress: {
main: {
options: {
archive: 'afterpayofficial.zip'
},
files: [
{src: ['controllers/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['classes/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['docs/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['override/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['logs/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['vendor/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['translations/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['upgrade/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['optionaloverride/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['oldoverride/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['sql/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['lib/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['defaultoverride/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: ['views/**'], dest: 'afterpayofficial/', filter: 'isFile'},
{src: '.htaccess', dest: 'afterpayofficial/'},
{src: 'index.php', dest: 'afterpayofficial/'},
{src: 'afterpayofficial.php', dest: 'afterpayofficial/'},
{src: 'logo.png', dest: 'afterpayofficial/'},
{src: 'README.md', dest: 'afterpayofficial/'}
]
}
}
});
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('default', [
'shell:composerProd',
'shell:autoindex',
'compress',
'shell:generateZip',
'shell:composerDev'
]);
//manually run the selenium test: "grunt shell:testPrestashop16"
};