generator-reshow 0.17.7 → 0.17.10

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,7 +2,7 @@
2
2
 
3
3
  > Docker generator
4
4
 
5
- ## Usage
5
+ ## Environment Variables
6
6
 
7
- ```
8
- ```
7
+ * DOCKER_LOGIN
8
+ * DOCKER_PASSWORD
@@ -2,6 +2,8 @@ ARG VERSION=${VERSION:-[VERSION]}
2
2
 
3
3
  FROM alpine:3.15
4
4
 
5
+ ARG VERSION
6
+
5
7
  # apk
6
8
  COPY ./install-packages.sh /usr/local/bin/
7
9
  RUN apk update && apk add bash bc \
@@ -11,9 +11,6 @@ jobs:
11
11
  parameters:
12
12
  docker-tag:
13
13
  type: string
14
- folder-prefix:
15
- type: string
16
- default: "<%= folderPrefix %>"
17
14
  executor: docker-publisher
18
15
  steps:
19
16
  - checkout
@@ -26,14 +23,16 @@ jobs:
26
23
  - run:
27
24
  name: Gen Docker file
28
25
  command: |
26
+ FOLDER_PREFIX=$(support/FOLDER_PREFIX.sh)
29
27
  ./build.sh << parameters.docker-tag >>
30
- ls -la << parameters.folder-prefix >><< parameters.docker-tag >>
28
+ ls -la ${FOLDER_PREFIX}<< parameters.docker-tag >>
31
29
  - run:
32
30
  name: build Docker image
33
31
  command: |
32
+ FOLDER_PREFIX=$(support/FOLDER_PREFIX.sh)
34
33
  IMAGE_NAME=$(support/targetImage.sh)
35
34
  BUILD_VERSION=<< parameters.docker-tag >>
36
- BUILD_FOLDER=<< parameters.folder-prefix >><< parameters.docker-tag >>
35
+ BUILD_FOLDER=${FOLDER_PREFIX}<< parameters.docker-tag >>
37
36
  BUILD_ARG=""
38
37
  docker build ${BUILD_ARG} -f ${BUILD_FOLDER}/Dockerfile \
39
38
  -t $IMAGE_NAME:${BUILD_VERSION} \
@@ -5,7 +5,9 @@ DIR="$(
5
5
  )"
6
6
  sourceImage=$(${DIR}/../support/sourceImage.sh)
7
7
  pid=$$
8
+ folderName=${PWD##*/}
8
9
 
9
- cli='env docker run --rm -it';
10
- cli+=" --name ${sourceImage}-${pid} ${sourceImage}";
11
- bash -c "$cli";
10
+ cli='env docker run --rm -it'
11
+ cli+=" --name ${folderName}_${pid} ${sourceImage}"
12
+ echo $cli
13
+ bash -c "$cli"
@@ -6,17 +6,22 @@ DIR="$(
6
6
  )"
7
7
 
8
8
  FOLDER_PREFIX=$(${DIR}/support/FOLDER_PREFIX.sh)
9
+ BUILD_VERSION=$1
10
+
11
+ if [ -z "$BUILD_VERSION" ]; then
12
+ echo "Not set build version."
13
+ exit 1;
14
+ fi
9
15
 
10
16
  do_build() {
11
- SED_REPLACE_VER=$1
12
- DEST_FOLDER=${DIR}/${FOLDER_PREFIX}${SED_REPLACE_VER}
17
+ DEST_FOLDER=${DIR}/${FOLDER_PREFIX}${BUILD_VERSION}
13
18
  mkdir -p ${DEST_FOLDER}
14
- echo "building --- Version: " $SED_REPLACE_VER "-->"
19
+ echo 'building --- Version: ' $BUILD_VERSION '-->'
15
20
  DEST_FILE=${DEST_FOLDER}/Dockerfile
16
21
  cp Dockerfile ${DEST_FILE}
17
22
  cp install-packages.sh ${DEST_FOLDER}
18
- sed -i -e "s|\[VERSION\]|$SED_REPLACE_VER|g" ${DEST_FILE}
23
+ sed -i -e "s|\[VERSION\]|$BUILD_VERSION|g" ${DEST_FILE}
19
24
  if [ -e "${DEST_FILE}-e" ]; then rm ${DEST_FILE}-e; fi
20
25
  }
21
26
 
22
- do_build $1
27
+ do_build
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-reshow",
3
- "version": "0.17.7",
3
+ "version": "0.17.10",
4
4
  "description": "Yeoman generator for reshow. (app, generator, ...etc)",
5
5
  "author": "Hill <hill@kimo.com>",
6
6
  "repository": {