1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-25 08:19:40 +02:00

fix(build-system): revert appveyor integration

* Revert "fix(build-system): fix local build system after appveyor introduction (#2528)"

This reverts commit 79c24ced96.

* Revert "feat(build-system): add support for AppVeyor CI (#2449)"

This reverts commit 65979709e9.
This commit is contained in:
Anthony Lapenna 2018-12-09 16:32:12 +13:00 committed by GitHub
parent 79c24ced96
commit f5dc663879
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 26 additions and 291 deletions

View file

@ -51,10 +51,6 @@ module.exports = function(grunt) {
grunt.task.run(['config:prod', 'clean:all', 'shell:buildBinary:' + p + ':' + a, 'shell:downloadDockerBinary:' + p + ':' + a, 'before-copy', 'copy:assets', 'after-copy']);
});
grunt.task.registerTask('appveyorbuild', 'appveyorbuild:<platform>:<arch>', function(p, a) {
grunt.task.run(['config:prod', 'clean:all', 'shell:buildBinaryOnAppveyor:' + p + ':' + a, 'shell:downloadDockerBinary:' + p + ':' + a, 'before-copy', 'copy:assets', 'after-copy']);
});
grunt.registerTask('lint', ['eslint']);
grunt.registerTask('run-dev', ['build', 'shell:run:' + arch, 'watch:build']);
grunt.registerTask('clear', ['clean:app']);
@ -264,49 +260,16 @@ gruntfile_cfg.replace = {
};
function shell_buildBinary(p, a) {
var binfile = 'portainer-' + p + '-' + a;
if (p === 'linux') {
return [
'if [ -f ' + (binfile) + ' ]; then',
'echo "Portainer binary exists";',
'else',
'build/build_binary.sh ' + p + ' ' + a + ';',
'fi'
].join(' ');
} else {
return [
'powershell -Command "& {if (Get-Item -Path ' + binfile + '.exe -ErrorAction:SilentlyContinue) {',
'Write-Host "Portainer binary exists"',
'} else {',
'& ".\\build\\build_binary.ps1" -platform ' + p + ' -arch ' + a + '',
'}}"'
].join(' ');
}
var binfile = 'dist/portainer-' + p + '-' + a;
return [
'if [ -f ' + ((p === 'windows') ? binfile + '.exe' : binfile) + ' ]; then',
'echo "Portainer binary exists";',
'else',
'build/build_in_container.sh ' + p + ' ' + a + ';',
'fi'
].join(' ');
}
function shell_buildBinaryOnAppveyor(p, a) {
var binfile = 'portainer-' + p + '-' + a;
if (p === 'linux') {
return [
'if [ -f ' + (binfile) + ' ]; then',
'echo "Portainer binary exists";',
'else',
'build/build_binary_appveyor.sh ' + p + ' ' + a + ';',
'fi'
].join(' ');
} else {
return [
'powershell -Command "& {if (Get-Item -Path ' + binfile + '.exe -ErrorAction:SilentlyContinue) {',
'Write-Host "Portainer binary exists"',
'} else {',
'& ".\\build\\build_binary_appveyor.ps1" -platform ' + p + ' -arch ' + a + '',
'}}"'
].join(' ');
}
}
function shell_run(arch) {
return [
'docker rm -f portainer',
@ -320,28 +283,17 @@ function shell_downloadDockerBinary(p, a) {
var ip = ((ps[p] === undefined) ? p : ps[p]);
var ia = ((as[a] === undefined) ? a : as[a]);
var binaryVersion = ((p === 'windows' ? '<%= shippedDockerVersionWindows %>' : '<%= shippedDockerVersion %>'));
if (p === 'linux') {
return [
'if [ -f dist/docker ]; then',
'echo "Docker binary exists";',
'else',
'build/download_docker_binary.sh ' + ip + ' ' + ia + ' ' + binaryVersion + ';',
'fi'
].join(' ');
} else {
return [
'powershell -Command "& {if (Get-Item -Path dist/docker.exe -ErrorAction:SilentlyContinue) {',
'Write-Host "Docker binary exists"',
'} else {',
'& ".\\build\\download_docker_binary.ps1" -docker_version ' + binaryVersion + '',
'}}"'
].join(' ');
}
return [
'if [ -f ' + ((p === 'windows') ? 'dist/docker.exe' : 'dist/docker') + ' ]; then',
'echo "Docker binary exists";',
'else',
'build/download_docker_binary.sh ' + ip + ' ' + ia + ' ' + binaryVersion + ';',
'fi'
].join(' ');
}
gruntfile_cfg.shell = {
buildBinary: { command: shell_buildBinary },
buildBinaryOnAppveyor: { command: shell_buildBinaryOnAppveyor },
run: { command: shell_run },
downloadDockerBinary: { command: shell_downloadDockerBinary }
};