generator-reshow 0.17.74 → 0.17.76

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.
@@ -26,7 +26,7 @@ module.exports = class extends YoGenerator {
26
26
  * https://github.com/SBoudrias/Inquirer.js
27
27
  */
28
28
  async prompting() {
29
- const { say, handleAnswers, promptChainAll } = YoHelper(this);
29
+ const { handleAnswers, promptChainAll } = YoHelper(this);
30
30
 
31
31
  const prompts = [
32
32
  ...commonPrompt.mainName(this),
@@ -1,15 +1,15 @@
1
1
  ARG VERSION=${VERSION:-[VERSION]}
2
2
 
3
- FROM alpine:3.17
3
+ FROM alpine:3.18
4
4
 
5
5
  ARG VERSION
6
6
 
7
7
  # apk
8
8
  COPY ./install-packages.sh /usr/local/bin/install-packages
9
9
  RUN apk update && apk add bash bc \
10
- && INSTALL_VERSION=$VERSION install-packages \
10
+ && INSTALL_VERSION=$VERSION INSTALL_TARGETPLATFORM=$TARGETPLATFORM install-packages \
11
11
  && rm /usr/local/bin/install-packages;
12
12
 
13
- COPY ./docker/entrypoint.sh /entrypoint.sh
14
- ENTRYPOINT ["/entrypoint.sh"]
13
+ COPY ./docker/sbin /usr/local/sbin
14
+ ENTRYPOINT ["/usr/local/sbin/entrypoint.sh"]
15
15
  CMD ["server"]
@@ -46,11 +46,14 @@ jobs:
46
46
  steps:
47
47
  - checkout
48
48
  - setup_remote_docker:
49
- version: 20.10.18
49
+ version: 20.10.24
50
50
  docker_layer_caching: true
51
51
  - run:
52
52
  name: Log time
53
53
  command: date
54
+ - run:
55
+ name: Get Rate Limit
56
+ command: ./compile.sh rate
54
57
  - run:
55
58
  name: Gen Docker file
56
59
  command: |
@@ -98,7 +101,7 @@ jobs:
98
101
  ./${BUILD_FOLDER}
99
102
  ./compile.sh updateDockerHubDesc
100
103
  - run:
101
- name: logout
104
+ name: logout
102
105
  command: docker logout
103
106
 
104
107
  workflows:
@@ -20,7 +20,7 @@ containerName=${localImage//\//-}-${pid}
20
20
  echo $containerName
21
21
 
22
22
  cli='env docker run --rm -it'
23
- cli+=" -v $DIR/../docker/entrypoint.sh:/entrypoint.sh"
23
+ cli+=" -v $DIR/../docker/sbin:/usr/local/sbin"
24
24
  cli+=" -v $MY_PWD:$MY_PWD"
25
25
  cli+=" -w $MY_PWD"
26
26
  cli+=" --entrypoint sh"
@@ -74,6 +74,14 @@ updateDockerHubDesc() {
74
74
  echo $RESULT
75
75
  }
76
76
 
77
+ getRateLimit() {
78
+ # https://docs.docker.com/docker-hub/download-rate-limit/
79
+ token=$(curl -s --user "${DOCKER_LOGIN}:${DOCKER_PASSWORD}" "https://auth.docker.io/token?service=registry.docker.io&scope=repository:ratelimitpreview/test:pull" | jq -r .token)
80
+ curl -s -I \
81
+ -H "Authorization: Bearer $token" \
82
+ "https://registry-1.docker.io/v2/ratelimitpreview/test/manifests/latest" | grep "ratelimit-"
83
+ }
84
+
77
85
  push() {
78
86
  login
79
87
  PUSH_VERSION=${1:-$VERSION}
@@ -147,6 +155,9 @@ case "$1" in
147
155
  updateDockerHubDesc)
148
156
  updateDockerHubDesc
149
157
  ;;
158
+ rate)
159
+ getRateLimit
160
+ ;;
150
161
  p)
151
162
  push $2 $3
152
163
  ;;
@@ -2,7 +2,7 @@
2
2
 
3
3
  # docker entrypoint script
4
4
  server() {
5
- tail -f /entrypoint.sh
5
+ tail -f /usr/local/sbin/entrypoint.sh
6
6
  }
7
7
 
8
8
  if [ "$1" = 'server' ]; then
@@ -33,5 +33,6 @@ apk add --virtual .build-deps $BUILD_DEPS && apk add $INSTALL --upgrade $UPGRADE
33
33
  #/* put your install code here */#
34
34
 
35
35
  apk del -f .build-deps && rm -rf /var/cache/apk/* || exit 1
36
+ echo $(date +%Y%m%d%S)'-'$TARGETPLATFORM > /build_version
36
37
 
37
38
  exit 0
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.17.74",
2
+ "version": "0.17.76",
3
3
  "name": "generator-reshow",
4
4
  "repository": {
5
5
  "type": "git",