mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59:41 +02:00
feat(project): introduce toolkit for containerized dev (#3863)
* feat(project): introduce toolkit for containerized dev * feat(project): clean up localserver shell cmd * feat(project): add install of yarn deps to grunt * feat(project): update gruntfile.js * Introduce an ARG statement for the GO_VERSION Co-authored-by: Anthony Lapenna <lapenna.anthony@gmail.com>
This commit is contained in:
parent
0b6dbec305
commit
7bd3d6e44a
4 changed files with 560 additions and 30 deletions
16
gruntfile.js
16
gruntfile.js
|
@ -38,10 +38,14 @@ module.exports = function (grunt) {
|
|||
|
||||
grunt.registerTask('start:server', ['build:server', 'copy:assets', 'shell:run_container']);
|
||||
|
||||
grunt.registerTask('start:client', ['config:dev', 'env:dev', 'webpack:devWatch']);
|
||||
grunt.registerTask('start:localserver', ['shell:build_binary:linux:' + arch, 'shell:run_localserver']);
|
||||
|
||||
grunt.registerTask('start:client', ['shell:install_yarndeps', 'config:dev', 'env:dev', 'webpack:devWatch']);
|
||||
|
||||
grunt.registerTask('start', ['start:server', 'start:client']);
|
||||
|
||||
grunt.registerTask('start:toolkit', ['start:localserver', 'start:client']);
|
||||
|
||||
grunt.task.registerTask('release', 'release:<platform>:<arch>', function (p = 'linux', a = arch) {
|
||||
grunt.task.run(['config:prod', 'env:prod', 'clean:all', 'copy:assets', 'shell:build_binary:' + p + ':' + a, 'shell:download_docker_binary:' + p + ':' + a, 'webpack:prod']);
|
||||
});
|
||||
|
@ -119,6 +123,8 @@ gruntfile_cfg.shell = {
|
|||
build_binary_azuredevops: { command: shell_build_binary_azuredevops },
|
||||
download_docker_binary: { command: shell_download_docker_binary },
|
||||
run_container: { command: shell_run_container },
|
||||
run_localserver: { command: shell_run_localserver, options: { async: true } },
|
||||
install_yarndeps: { command: shell_install_yarndeps },
|
||||
};
|
||||
|
||||
function shell_build_binary(p, a) {
|
||||
|
@ -153,6 +159,14 @@ function shell_run_container() {
|
|||
].join(';');
|
||||
}
|
||||
|
||||
function shell_run_localserver() {
|
||||
return './dist/portainer --no-analytics';
|
||||
}
|
||||
|
||||
function shell_install_yarndeps() {
|
||||
return 'yarn';
|
||||
}
|
||||
|
||||
function shell_download_docker_binary(p, a) {
|
||||
var ps = { windows: 'win', darwin: 'mac' };
|
||||
var as = { amd64: 'x86_64', arm: 'armhf', arm64: 'aarch64' };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue