generator-reshow 0.17.13 → 0.17.15

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.
@@ -2,3 +2,5 @@ sourceImage=<%= sourceImage %>
2
2
  targetImage=<%= targetImage %>
3
3
  VERSION=0.0
4
4
  FOLDER_PREFIX=<%= folderPrefix %>
5
+ COPY_FILES[]=Dockerfile
6
+ COPY_FILES[]=install-packages.sh
@@ -20,12 +20,14 @@ jobs:
20
20
  - run:
21
21
  name: Log time
22
22
  command: date
23
- - run:
24
- name: Gen Docker file
25
- command: |
26
- FOLDER_PREFIX=$(support/FOLDER_PREFIX.sh)
27
- ./build.sh << parameters.docker-tag >>
28
- ls -la ${FOLDER_PREFIX}<< parameters.docker-tag >>
23
+ - run: FOLDER_PREFIX=$(support/FOLDER_PREFIX.sh)
24
+ FOLDER=${FOLDER_PREFIX}<< parameters.docker-tag >>
25
+ ./build.sh << parameters.docker-tag >>
26
+ ls -la ${FOLDER}
27
+ echo "###"
28
+ echo "# --- Dockerfile Content ---"
29
+ echo "###"
30
+ cat ${FOLDER}/Dockerfile
29
31
  - run:
30
32
  name: build Docker image
31
33
  command: |
@@ -6,6 +6,7 @@ DIR="$(
6
6
  )"
7
7
 
8
8
  FOLDER_PREFIX=$(${DIR}/support/FOLDER_PREFIX.sh)
9
+ COPY_FILES=$(${DIR}/support/COPY_FILES.sh)
9
10
  BUILD_VERSION=$1
10
11
 
11
12
  if [ -z "$BUILD_VERSION" ]; then
@@ -17,9 +18,8 @@ do_build() {
17
18
  DEST_FOLDER=${DIR}/${FOLDER_PREFIX}${BUILD_VERSION}
18
19
  mkdir -p ${DEST_FOLDER}
19
20
  echo 'building --- Version: ' $BUILD_VERSION '-->'
21
+ for file in $COPY_FILES; do [ -e "$file" ] && cp $file ${DEST_FOLDER}; done
20
22
  DEST_FILE=${DEST_FOLDER}/Dockerfile
21
- cp Dockerfile ${DEST_FILE}
22
- cp install-packages.sh ${DEST_FOLDER}
23
23
  sed -i -e "s|\[VERSION\]|$BUILD_VERSION|g" ${DEST_FILE}
24
24
  if [ -e "${DEST_FILE}-e" ]; then rm ${DEST_FILE}-e; fi
25
25
  }
@@ -0,0 +1,13 @@
1
+ #!/bin/bash
2
+
3
+ DIR="$(
4
+ cd "$(dirname "$0")"
5
+ pwd -P
6
+ )"
7
+ ENV=${DIR}/../.env.build
8
+
9
+ if [ -z "$COPY_FILES" ]; then
10
+ COPY_FILES=$(awk -F "=" '/^COPY_FILES\[\]/ {print $2}' $ENV)
11
+ fi
12
+
13
+ echo $COPY_FILES
@@ -1,8 +1,12 @@
1
1
  #!/bin/bash
2
- DIR="$( cd "$(dirname "$0")" ; pwd -P )"
2
+ DIR="$(
3
+ cd "$(dirname "$0")"
4
+ pwd -P
5
+ )"
6
+ ENV=${DIR}/../.env.build
3
7
 
4
8
  if [ -z $FOLDER_PREFIX ]; then
5
- FOLDER_PREFIX=$(awk -F "=" '/^FOLDER_PREFIX/ {print $2}' ${DIR}/../.env.build)
9
+ FOLDER_PREFIX=$(awk -F "=" '/^FOLDER_PREFIX/ {print $2}' $ENV)
6
10
  fi
7
11
 
8
12
  echo $FOLDER_PREFIX
@@ -1,8 +1,9 @@
1
1
  #!/bin/bash
2
2
  DIR="$( cd "$(dirname "$0")" ; pwd -P )"
3
+ ENV=${DIR}/../.env.build
3
4
 
4
5
  if [ -z $VERSION ]; then
5
- VERSION=$(awk -F "=" '/^VERSION/ {print $2}' ${DIR}/../.env.build)
6
+ VERSION=$(awk -F "=" '/^VERSION/ {print $2}' $ENV)
6
7
  fi
7
8
 
8
9
  echo $VERSION
@@ -1,8 +1,12 @@
1
1
  #!/bin/bash
2
- DIR="$( cd "$(dirname "$0")" ; pwd -P )"
2
+ DIR="$(
3
+ cd "$(dirname "$0")"
4
+ pwd -P
5
+ )"
6
+ ENV=${DIR}/../.env.build
3
7
 
4
8
  if [ -z $sourceImage ]; then
5
- sourceImage=$(awk -F "=" '/^sourceImage/ {print $2}' ${DIR}/../.env.build)
9
+ sourceImage=$(awk -F "=" '/^sourceImage/ {print $2}' $ENV)
6
10
  fi
7
11
 
8
12
  echo $sourceImage
@@ -1,8 +1,12 @@
1
1
  #!/bin/bash
2
- DIR="$( cd "$(dirname "$0")" ; pwd -P )"
2
+ DIR="$(
3
+ cd "$(dirname "$0")"
4
+ pwd -P
5
+ )"
6
+ ENV=${DIR}/../.env.build
3
7
 
4
8
  if [ -z $targetImage ]; then
5
- targetImage=$(awk -F "=" '/^targetImage/ {print $2}' ${DIR}/../.env.build)
9
+ targetImage=$(awk -F "=" '/^targetImage/ {print $2}' $ENV)
6
10
  fi
7
11
 
8
12
  echo $targetImage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-reshow",
3
- "version": "0.17.13",
3
+ "version": "0.17.15",
4
4
  "description": "Yeoman generator for reshow. (app, generator, ...etc)",
5
5
  "author": "Hill <hill@kimo.com>",
6
6
  "repository": {