diff --git a/build.sh b/build.sh index e8d603292..36e86b8a9 100755 --- a/build.sh +++ b/build.sh @@ -14,7 +14,7 @@ function build_and_push_images() { function build_archive() { BUILD_FOLDER="${ARCHIVE_BUILD_FOLDER}/$1" rm -rf ${BUILD_FOLDER} && mkdir -pv ${BUILD_FOLDER}/portainer - mv dist/* ${BUILD_FOLDER}/portainer/ + cp -r dist/* ${BUILD_FOLDER}/portainer/ cd ${BUILD_FOLDER} tar cvpfz "portainer-${VERSION}-$1.tar.gz" portainer mv "portainer-${VERSION}-$1.tar.gz" ${ARCHIVE_BUILD_FOLDER}/ diff --git a/gruntfile.js b/gruntfile.js index 7337b128d..ffb5054d2 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -31,7 +31,6 @@ module.exports = function (grunt) { 'clean:all', 'before-copy', 'copy:assets', - 'copy:templates', 'after-copy' ]); grunt.registerTask('build', [ @@ -82,6 +81,7 @@ module.exports = function (grunt) { root: 'dist', distdir: 'dist/public', shippedDockerVersion: '18.03.1-ce', + shippedDockerVersionWindows: '17.09.0-ce', pkg: grunt.file.readJSON('package.json'), config: gruntfile_cfg.config, src: gruntfile_cfg.src, @@ -122,7 +122,7 @@ gruntfile_cfg.src = { }; gruntfile_cfg.clean = { - all: ['<%= distdir %>/../*'], + all: ['<%= root %>/*'], app: ['<%= distdir %>/*', '!<%= distdir %>/../portainer*', '!<%= distdir %>/../docker*'], tmpl: ['<%= distdir %>/templates'], tmp: ['<%= distdir %>/js/*', '!<%= distdir %>/js/app.*.js', '<%= distdir %>/css/*', '!<%= distdir %>/css/app.*.css'] @@ -163,12 +163,8 @@ gruntfile_cfg.copy = { {dest: '<%= distdir %>/fonts/', src: '*.{ttf,woff,woff2,eof,eot,svg}', expand: true, cwd: 'node_modules/@fortawesome/fontawesome-free-webfonts/webfonts/'}, {dest: '<%= distdir %>/fonts/', src: '*.{ttf,woff,woff2,eof,svg}', expand: true, cwd: 'node_modules/rdash-ui/dist/fonts/'}, {dest: '<%= distdir %>/images/', src: '**', expand: true, cwd: 'assets/images/'}, - {dest: '<%= distdir %>/ico', src: '**', expand: true, cwd: 'assets/ico'} - ] - }, - templates: { - files: [ - { dest: '<%= root %>/', src: 'templates.json', cwd: '' } + {dest: '<%= distdir %>/ico', src: '**', expand: true, cwd: 'assets/ico'}, + {dest: '<%= root %>/', src: 'templates.json', cwd: ''} ] } }; @@ -289,7 +285,7 @@ function shell_downloadDockerBinary(p, a) { 'if [ -f '+(( p === 'win' ) ? 'dist/docker.exe' : 'dist/docker')+' ]; then', 'echo "Docker binary exists";', 'else', - 'build/download_docker_binary.sh ' + ip + ' ' + ia + ' <%= shippedDockerVersion %>;', + 'build/download_docker_binary.sh ' + ip + ' ' + ia + (( p === 'win' ? '<%= shippedDockerVersionWindows %>' : '<%= shippedDockerVersion %>' )) + ';', 'fi' ].join(' '); }