@iris.interactive/handcook 2.10.23 → 2.10.25

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.
Files changed (3) hide show
  1. package/.gitlab-ci.yml +97 -0
  2. package/.nvmrc +1 -0
  3. package/package.json +1 -1
package/.gitlab-ci.yml ADDED
@@ -0,0 +1,97 @@
1
+ image: node:16.14.2-alpine
2
+
3
+ stages:
4
+ - publish
5
+ - release
6
+
7
+ variables:
8
+ GIT_STRATEGY: clone
9
+ GIT_SUBMODULE_STRATEGY: recursive
10
+
11
+ default:
12
+ retry:
13
+ max: 2
14
+ when:
15
+ - runner_system_failure
16
+ - unknown_failure
17
+ - stuck_or_timeout_failure
18
+ - api_failure
19
+ interruptible: true
20
+
21
+ Build:
22
+ stage: publish
23
+ rules:
24
+ - if: $CI_COMMIT_REF_PROTECTED == "true" && $CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^(\d+\.)(\d+\.)(\d+)$/
25
+ variables:
26
+ TAG: latest
27
+ when: on_success
28
+ - if: $CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^(\d+)\.(\d+)\.(\d+)(?:-([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))(?:\+[\dA-Za-z-]+)?$/
29
+ variables:
30
+ TAG: dev
31
+ when: on_success
32
+ - when: never
33
+ script:
34
+ - command -v jq >/dev/null || ( apk update && apk add jq )
35
+ - echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> .npmrc
36
+ - VERSION="$( cat package.json | jq -r '.version' )"
37
+ - |
38
+ if [ $TAG == "dev" ]; then
39
+ TAG="$(echo $CI_COMMIT_TAG | sed -nE 's/^(\d+\.)(\d+\.)?(\d+)?-(.*)/\4/p')"
40
+ if [ -z "$TAG" ]; then
41
+ TAG="dev"
42
+ fi
43
+ fi
44
+ - |
45
+ if $( npm view @iris.interactive/handcook time --json | jq -e ".[\"${VERSION}\"]" ); then
46
+ echo "Version ${VERSION} already published."
47
+ if [ $TAG == "latest" ]; then
48
+ if [ "$(npm view @iris.interactive/handcook dist-tags"[latest]")" != "$VERSION" ]; then
49
+ echo "Changing @iris.interactive/handcook@${VERSION} tag to latest."
50
+ npm dist-tag add "@iris.interactive/handcook@${VERSION}" latest
51
+ else
52
+ echo "@iris.interactive/handcook@${VERSION} already have latest tag."
53
+ exit 1
54
+ fi
55
+ else
56
+ if [ "$(npm view @iris.interactive/handcook dist-tags"[$TAG]")" == "$VERSION" ]; then
57
+ echo "@iris.interactive/handcook@${VERSION} already have $TAG tag."
58
+ exit 1
59
+ else
60
+ echo "Changing @iris.interactive/handcook@${VERSION} tag to $TAG."
61
+ npm dist-tag add "@iris.interactive/handcook@${VERSION}" $TAG
62
+ fi
63
+ fi
64
+ else
65
+ npm install --save-dev
66
+ npm run build
67
+ npm publish --tag $TAG
68
+ fi
69
+
70
+ Release:
71
+ stage: release
72
+ image: registry.gitlab.com/gitlab-org/release-cli:latest
73
+ needs:
74
+ - Build
75
+ rules:
76
+ - if: $CI_COMMIT_REF_PROTECTED == "true" && $CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^(\d+\.)(\d+\.)(\d+)$/
77
+ variables:
78
+ TAG: latest
79
+ when: on_success
80
+ - if: $CI_COMMIT_TAG && $CI_COMMIT_TAG =~ /^(\d+)\.(\d+)\.(\d+)(?:-([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))(?:\+[\dA-Za-z-]+)?$/
81
+ variables:
82
+ TAG: dev
83
+ when: on_success
84
+ - when: never
85
+ script:
86
+ - echo "Running release job"
87
+ release:
88
+ name: Release $CI_COMMIT_TAG
89
+ description: $EXTRA_DESCRIPTION
90
+ tag_name: $CI_COMMIT_TAG
91
+ ref: $CI_COMMIT_TAG
92
+ assets:
93
+ # Add a link to the docker image in the release assets.
94
+ links:
95
+ - name: "@iris.interactive/handcook@${CI_COMMIT_REF_NAME}"
96
+ url: "https://www.npmjs.com/package/@iris.interactive/etourismeapi?activeTab=versions"
97
+ link_type: other
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ v16.14.2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iris.interactive/handcook",
3
- "version": "2.10.23",
3
+ "version": "2.10.25",
4
4
  "description": "The web cooking by IRIS Interactive",
5
5
  "main": "./public/scripts/index.js",
6
6
  "scripts": {