@adminforth/i18n 1.6.6 → 1.6.8
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/.woodpecker/buildSlackNotify.sh +7 -3
- package/.woodpecker/release.yml +24 -10
- package/build.log +2 -2
- package/package.json +2 -2
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
|
+
set -x
|
|
3
4
|
|
|
4
5
|
COMMIT_SHORT_SHA=$(echo $CI_COMMIT_SHA | cut -c1-8)
|
|
5
6
|
|
|
7
|
+
STATUS=${1}
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
|
|
10
|
+
if [ "$STATUS" = "success" ]; then
|
|
8
11
|
MESSAGE="Did a build without issues on \`$CI_REPO_NAME/$CI_COMMIT_BRANCH\`. Commit: _${CI_COMMIT_MESSAGE}_ (<$CI_COMMIT_URL|$COMMIT_SHORT_SHA>)"
|
|
9
12
|
|
|
10
13
|
curl -s -X POST -H "Content-Type: application/json" -d '{
|
|
@@ -22,13 +25,14 @@ if [ "$CI_STEP_STATUS" = "success" ]; then
|
|
|
22
25
|
fi
|
|
23
26
|
export BUILD_LOG=$(cat ./build.log)
|
|
24
27
|
|
|
28
|
+
BUILD_LOG=$(echo $BUILD_LOG | sed 's/"/\\"/g')
|
|
25
29
|
|
|
26
30
|
MESSAGE="Broke \`$CI_REPO_NAME/$CI_COMMIT_BRANCH\` with commit _${CI_COMMIT_MESSAGE}_ (<$CI_COMMIT_URL|$COMMIT_SHORT_SHA>)"
|
|
27
31
|
CODE_BLOCK="\`\`\`$BUILD_LOG\n\`\`\`"
|
|
28
32
|
|
|
29
33
|
echo "Sending slack message to developers $MESSAGE"
|
|
30
34
|
# Send the message
|
|
31
|
-
curl
|
|
35
|
+
curl -sS -X POST -H "Content-Type: application/json" -d '{
|
|
32
36
|
"username": "'"$CI_COMMIT_AUTHOR"'",
|
|
33
37
|
"icon_url": "'"$CI_COMMIT_AUTHOR_AVATAR"'",
|
|
34
38
|
"attachments": [
|
|
@@ -39,4 +43,4 @@ curl -X POST -H "Content-Type: application/json" -d '{
|
|
|
39
43
|
"pretext": "'"$MESSAGE"'"
|
|
40
44
|
}
|
|
41
45
|
]
|
|
42
|
-
}' "$DEVELOPERS_SLACK_WEBHOOK"
|
|
46
|
+
}' "$DEVELOPERS_SLACK_WEBHOOK" 2>&1
|
package/.woodpecker/release.yml
CHANGED
|
@@ -16,28 +16,42 @@ steps:
|
|
|
16
16
|
commands:
|
|
17
17
|
- infisical export --domain https://vault.devforth.io/api --format=dotenv-export --env="prod" > /woodpecker/deploy.vault.env
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
build:
|
|
20
20
|
image: node:20
|
|
21
21
|
when:
|
|
22
22
|
- event: push
|
|
23
|
-
volumes:
|
|
24
|
-
- /var/run/docker.sock:/var/run/docker.sock
|
|
25
23
|
commands:
|
|
26
|
-
# install rsync
|
|
27
24
|
- apt update && apt install -y rsync
|
|
28
|
-
-
|
|
25
|
+
- . /woodpecker/deploy.vault.env
|
|
29
26
|
- npm clean-install
|
|
30
27
|
- /bin/bash ./.woodpecker/buildRelease.sh
|
|
31
28
|
- npm audit signatures
|
|
29
|
+
|
|
30
|
+
release:
|
|
31
|
+
image: node:20
|
|
32
|
+
when:
|
|
33
|
+
- event:
|
|
34
|
+
- push
|
|
35
|
+
branch:
|
|
36
|
+
- main
|
|
37
|
+
commands:
|
|
38
|
+
- . /woodpecker/deploy.vault.env
|
|
32
39
|
- npx semantic-release
|
|
33
40
|
|
|
34
41
|
slack-on-failure:
|
|
42
|
+
image: curlimages/curl
|
|
35
43
|
when:
|
|
36
44
|
- event: push
|
|
37
|
-
status: [failure
|
|
38
|
-
|
|
45
|
+
status: [failure]
|
|
46
|
+
commands:
|
|
47
|
+
- . /woodpecker/deploy.vault.env
|
|
48
|
+
- /bin/sh ./.woodpecker/buildSlackNotify.sh failure
|
|
49
|
+
|
|
50
|
+
slack-on-success:
|
|
39
51
|
image: curlimages/curl
|
|
52
|
+
when:
|
|
53
|
+
- event: push
|
|
54
|
+
status: [success]
|
|
40
55
|
commands:
|
|
41
|
-
-
|
|
42
|
-
- /bin/sh ./.woodpecker/buildSlackNotify.sh
|
|
43
|
-
|
|
56
|
+
- . /woodpecker/deploy.vault.env
|
|
57
|
+
- /bin/sh ./.woodpecker/buildSlackNotify.sh success
|
package/build.log
CHANGED
|
@@ -17,5 +17,5 @@ custom/package-lock.json
|
|
|
17
17
|
custom/package.json
|
|
18
18
|
custom/tsconfig.json
|
|
19
19
|
|
|
20
|
-
sent 33,
|
|
21
|
-
total size is 32,230 speedup is 0.
|
|
20
|
+
sent 33,163 bytes received 248 bytes 66,822.00 bytes/sec
|
|
21
|
+
total size is 32,230 speedup is 0.96
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/i18n",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.8",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"type": "module",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"iso-639-1": "^3.1.3"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"adminforth": "
|
|
39
|
+
"adminforth": "next"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/node": "^22.10.7",
|