mirror of https://github.com/portainer/portainer
fix(build-system): fix invalid template copy step (#2089)
parent
8cca3de70b
commit
2e0d1f289c
2
build.sh
2
build.sh
|
@ -14,7 +14,7 @@ function build_and_push_images() {
|
||||||
function build_archive() {
|
function build_archive() {
|
||||||
BUILD_FOLDER="${ARCHIVE_BUILD_FOLDER}/$1"
|
BUILD_FOLDER="${ARCHIVE_BUILD_FOLDER}/$1"
|
||||||
rm -rf ${BUILD_FOLDER} && mkdir -pv ${BUILD_FOLDER}/portainer
|
rm -rf ${BUILD_FOLDER} && mkdir -pv ${BUILD_FOLDER}/portainer
|
||||||
mv dist/* ${BUILD_FOLDER}/portainer/
|
cp -r dist/* ${BUILD_FOLDER}/portainer/
|
||||||
cd ${BUILD_FOLDER}
|
cd ${BUILD_FOLDER}
|
||||||
tar cvpfz "portainer-${VERSION}-$1.tar.gz" portainer
|
tar cvpfz "portainer-${VERSION}-$1.tar.gz" portainer
|
||||||
mv "portainer-${VERSION}-$1.tar.gz" ${ARCHIVE_BUILD_FOLDER}/
|
mv "portainer-${VERSION}-$1.tar.gz" ${ARCHIVE_BUILD_FOLDER}/
|
||||||
|
|
12
gruntfile.js
12
gruntfile.js
|
@ -31,7 +31,6 @@ module.exports = function (grunt) {
|
||||||
'clean:all',
|
'clean:all',
|
||||||
'before-copy',
|
'before-copy',
|
||||||
'copy:assets',
|
'copy:assets',
|
||||||
'copy:templates',
|
|
||||||
'after-copy'
|
'after-copy'
|
||||||
]);
|
]);
|
||||||
grunt.registerTask('build', [
|
grunt.registerTask('build', [
|
||||||
|
@ -82,6 +81,7 @@ module.exports = function (grunt) {
|
||||||
root: 'dist',
|
root: 'dist',
|
||||||
distdir: 'dist/public',
|
distdir: 'dist/public',
|
||||||
shippedDockerVersion: '18.03.1-ce',
|
shippedDockerVersion: '18.03.1-ce',
|
||||||
|
shippedDockerVersionWindows: '17.09.0-ce',
|
||||||
pkg: grunt.file.readJSON('package.json'),
|
pkg: grunt.file.readJSON('package.json'),
|
||||||
config: gruntfile_cfg.config,
|
config: gruntfile_cfg.config,
|
||||||
src: gruntfile_cfg.src,
|
src: gruntfile_cfg.src,
|
||||||
|
@ -122,7 +122,7 @@ gruntfile_cfg.src = {
|
||||||
};
|
};
|
||||||
|
|
||||||
gruntfile_cfg.clean = {
|
gruntfile_cfg.clean = {
|
||||||
all: ['<%= distdir %>/../*'],
|
all: ['<%= root %>/*'],
|
||||||
app: ['<%= distdir %>/*', '!<%= distdir %>/../portainer*', '!<%= distdir %>/../docker*'],
|
app: ['<%= distdir %>/*', '!<%= distdir %>/../portainer*', '!<%= distdir %>/../docker*'],
|
||||||
tmpl: ['<%= distdir %>/templates'],
|
tmpl: ['<%= distdir %>/templates'],
|
||||||
tmp: ['<%= distdir %>/js/*', '!<%= distdir %>/js/app.*.js', '<%= distdir %>/css/*', '!<%= distdir %>/css/app.*.css']
|
tmp: ['<%= distdir %>/js/*', '!<%= distdir %>/js/app.*.js', '<%= distdir %>/css/*', '!<%= distdir %>/css/app.*.css']
|
||||||
|
@ -163,11 +163,7 @@ 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,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 %>/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 %>/images/', src: '**', expand: true, cwd: 'assets/images/'},
|
||||||
{dest: '<%= distdir %>/ico', src: '**', expand: true, cwd: 'assets/ico'}
|
{dest: '<%= distdir %>/ico', src: '**', expand: true, cwd: 'assets/ico'},
|
||||||
]
|
|
||||||
},
|
|
||||||
templates: {
|
|
||||||
files: [
|
|
||||||
{dest: '<%= root %>/', src: 'templates.json', cwd: ''}
|
{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',
|
'if [ -f '+(( p === 'win' ) ? 'dist/docker.exe' : 'dist/docker')+' ]; then',
|
||||||
'echo "Docker binary exists";',
|
'echo "Docker binary exists";',
|
||||||
'else',
|
'else',
|
||||||
'build/download_docker_binary.sh ' + ip + ' ' + ia + ' <%= shippedDockerVersion %>;',
|
'build/download_docker_binary.sh ' + ip + ' ' + ia + (( p === 'win' ? '<%= shippedDockerVersionWindows %>' : '<%= shippedDockerVersion %>' )) + ';',
|
||||||
'fi'
|
'fi'
|
||||||
].join(' ');
|
].join(' ');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue