diff --git a/.gitignore b/.gitignore index ea31b37..1988652 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ #.vscode static/node_modules static/dist -.env \ No newline at end of file +.env +dist \ No newline at end of file diff --git a/scripts/docker-action b/scripts/docker-action index efaf4fb..04f6a28 100755 --- a/scripts/docker-action +++ b/scripts/docker-action @@ -35,6 +35,16 @@ publish () { done } +save () { + echo "save: $1" + . "$1/.env" + mkdir -p "$1/dist" + for PROJECT in "${DOCKER_PROJECTS[@]}"; do + IFS=: read -r PROJECT_NAME PROJECT_TARGET <<< "$PROJECT" + docker save --output "$1/dist/$PROJECT_NAME-$VERSION.tar" "$DOCKER_GROUP/$PROJECT_NAME" + done +} + DEFAULT_TARGETS="." TARGETS="${@-$DEFAULT_TARGETS}"