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() {
|
||||
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}/
|
||||
|
|
12
gruntfile.js
12
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,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,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: '<%= 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(' ');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue