generator-reshow 0.17.15 → 0.17.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/docker/README.md +4 -2
- package/generators/docker/templates/.env.build +1 -1
- package/generators/docker/templates/_circleci/config.yml +17 -8
- package/generators/docker/templates/build.sh +12 -5
- package/generators/docker/templates/compile.sh +3 -0
- package/generators/docker/templates/support/DOCKER_FILES.sh +13 -0
- package/package.json +1 -1
|
@@ -20,14 +20,23 @@ jobs:
|
|
|
20
20
|
- run:
|
|
21
21
|
name: Log time
|
|
22
22
|
command: date
|
|
23
|
-
- run:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
- run:
|
|
24
|
+
name: Gen Docker file
|
|
25
|
+
command: |
|
|
26
|
+
FOLDER_PREFIX=$(support/FOLDER_PREFIX.sh)
|
|
27
|
+
DOCKER_FILES=$(support/DOCKER_FILES.sh)
|
|
28
|
+
FOLDER=${FOLDER_PREFIX}<< parameters.docker-tag >>
|
|
29
|
+
./build.sh << parameters.docker-tag >>
|
|
30
|
+
ls -la ${FOLDER}
|
|
31
|
+
for file in $DOCKER_FILES; do
|
|
32
|
+
echo ""
|
|
33
|
+
echo "###"
|
|
34
|
+
echo "# --- Dockerfile ($file) Content ---"
|
|
35
|
+
echo "###"
|
|
36
|
+
echo ""
|
|
37
|
+
cat ${FOLDER}/$file
|
|
38
|
+
echo ""
|
|
39
|
+
done
|
|
31
40
|
- run:
|
|
32
41
|
name: build Docker image
|
|
33
42
|
command: |
|
|
@@ -7,21 +7,28 @@ DIR="$(
|
|
|
7
7
|
|
|
8
8
|
FOLDER_PREFIX=$(${DIR}/support/FOLDER_PREFIX.sh)
|
|
9
9
|
COPY_FILES=$(${DIR}/support/COPY_FILES.sh)
|
|
10
|
+
DOCKER_FILES=$(${DIR}/support/DOCKER_FILES.sh)
|
|
10
11
|
BUILD_VERSION=$1
|
|
11
12
|
|
|
12
13
|
if [ -z "$BUILD_VERSION" ]; then
|
|
13
14
|
echo "Not set build version."
|
|
14
|
-
exit 1
|
|
15
|
+
exit 1
|
|
15
16
|
fi
|
|
16
17
|
|
|
17
18
|
do_build() {
|
|
19
|
+
echo 'building --- Version: ' $BUILD_VERSION '-->'
|
|
18
20
|
DEST_FOLDER=${DIR}/${FOLDER_PREFIX}${BUILD_VERSION}
|
|
19
21
|
mkdir -p ${DEST_FOLDER}
|
|
20
|
-
|
|
22
|
+
|
|
21
23
|
for file in $COPY_FILES; do [ -e "$file" ] && cp $file ${DEST_FOLDER}; done
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
for file in $DOCKER_FILES; do
|
|
25
|
+
if [ -e "$file" ]; then
|
|
26
|
+
cp $file ${DEST_FOLDER}
|
|
27
|
+
DEST_FILE=${DEST_FOLDER}/$file
|
|
28
|
+
sed -i -e "s|\[VERSION\]|$BUILD_VERSION|g" ${DEST_FILE}
|
|
29
|
+
if [ -e "${DEST_FILE}-e" ]; then rm ${DEST_FILE}-e; fi
|
|
30
|
+
fi
|
|
31
|
+
done
|
|
25
32
|
}
|
|
26
33
|
|
|
27
34
|
do_build
|
|
@@ -70,6 +70,9 @@ build() {
|
|
|
70
70
|
if [ ! -z "$VERSION" ]; then
|
|
71
71
|
BUILD_ARG="$BUILD_ARG --build-arg VERSION=${VERSION}"
|
|
72
72
|
fi
|
|
73
|
+
if [ ! -z "$ALT_VERSION" ]; then
|
|
74
|
+
BUILD_ARG="$BUILD_ARG --build-arg ALT_VERSION=${ALT_VERSION}"
|
|
75
|
+
fi
|
|
73
76
|
echo build: ${DIR}/${DOCKER_FILE}
|
|
74
77
|
if [ "x" != "x$NO_CACHE" ]; then
|
|
75
78
|
echo nocache: ${NO_CACHE}
|