File tree 5 files changed +130
-16
lines changed
Filter options
5 files changed +130
-16
lines changed
Original file line number Diff line number Diff line change
1
+
2
+ #! /bin/bash
3
+
4
+ # write npm run output both to console and to build.log
5
+ npm run build 2>&1 | tee build.log
6
+ build_status=${PIPESTATUS[0]}
7
+
8
+ # if exist status from the npm run build is not 0
9
+ # then exit with the status code from the npm run build
10
+ if [ $build_status -ne 0 ]; then
11
+ echo " Build failed. Exiting with status code $build_status "
12
+ exit $build_status
13
+ fi
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+
4
+ COMMIT_SHORT_SHA=$( echo $CI_COMMIT_SHA | cut -c1-8)
5
+
6
+
7
+ if [ " $CI_STEP_STATUS " = " success" ]; then
8
+ MESSAGE=" Did a build without issues on \` $CI_REPO_NAME /$CI_COMMIT_BRANCH \` . Commit: _${CI_COMMIT_MESSAGE} _ (<$CI_COMMIT_URL |$COMMIT_SHORT_SHA >)"
9
+
10
+ curl -s -X POST -H " Content-Type: application/json" -d ' {
11
+ "username": "' " $CI_COMMIT_AUTHOR " ' ",
12
+ "icon_url": "' " $CI_COMMIT_AUTHOR_AVATAR " ' ",
13
+ "attachments": [
14
+ {
15
+ "mrkdwn_in": ["text", "pretext"],
16
+ "color": "#36a64f",
17
+ "text": "' " $MESSAGE " ' "
18
+ }
19
+ ]
20
+ }' " $DEVELOPERS_SLACK_WEBHOOK "
21
+ exit 0
22
+ fi
23
+ export BUILD_LOG=$( cat ./build.log)
24
+
25
+
26
+ MESSAGE=" Broke \` $CI_REPO_NAME /$CI_COMMIT_BRANCH \` with commit _${CI_COMMIT_MESSAGE} _ (<$CI_COMMIT_URL |$COMMIT_SHORT_SHA >)"
27
+ CODE_BLOCK=" \`\`\` $BUILD_LOG \n\`\`\` "
28
+
29
+ echo " Sending slack message to developers $MESSAGE "
30
+ # Send the message
31
+ curl -X POST -H " Content-Type: application/json" -d ' {
32
+ "username": "' " $CI_COMMIT_AUTHOR " ' ",
33
+ "icon_url": "' " $CI_COMMIT_AUTHOR_AVATAR " ' ",
34
+ "attachments": [
35
+ {
36
+ "mrkdwn_in": ["text", "pretext"],
37
+ "color": "#8A1C12",
38
+ "text": "' " $CODE_BLOCK " ' ",
39
+ "pretext": "' " $MESSAGE " ' "
40
+ }
41
+ ]
42
+ }' " $DEVELOPERS_SLACK_WEBHOOK "
Original file line number Diff line number Diff line change
1
+ clone :
2
+ git :
3
+ image : woodpeckerci/plugin-git
4
+ settings :
5
+ partial : false
6
+ depth : 5
7
+
8
+ steps :
9
+ init-secrets :
10
+ when :
11
+ - event : push
12
+ image : infisical/cli
13
+ environment :
14
+ INFISICAL_TOKEN :
15
+ from_secret : VAULT_TOKEN
16
+ commands :
17
+ - infisical export --domain https://vault.devforth.io/api --format=dotenv-export --env="prod" > /woodpecker/deploy.vault.env
18
+ secrets :
19
+ - VAULT_TOKEN
20
+
21
+ release :
22
+ image : node:20
23
+ when :
24
+ - event : push
25
+ volumes :
26
+ - /var/run/docker.sock:/var/run/docker.sock
27
+ commands :
28
+ - export $(cat /woodpecker/deploy.vault.env | xargs)
29
+ - npm clean-install
30
+ - /bin/bash ./.woodpecker/buildRelease.sh
31
+ - npm audit signatures
32
+ - npx semantic-release
33
+
34
+ slack-on-failure :
35
+ when :
36
+ - event : push
37
+ status : [failure, success]
38
+ - event : push
39
+ image : curlimages/curl
40
+ commands :
41
+ - export $(cat /woodpecker/deploy.vault.env | xargs)
42
+ - /bin/sh ./.woodpecker/buildSlackNotify.sh
43
+
Original file line number Diff line number Diff line change 1
1
2
- ## [ 1.0.30 ] - 2024-12-26
2
+ # Changelog
3
3
4
- ### Improved
4
+ The complete changelog is available on the [ GitHub Releases page ] ( https://github.com/devforth/adminforth-upload/releases ) .
5
5
6
- - Add 'record' param for s3Path callback in edit mode
7
-
8
- ## [ 1.0.24] - 2023-12-24
9
-
10
- ### Fixed
11
- - Add translation
12
-
13
- ## [ 1.0.23] - 2023-10-07
14
-
15
- ### Fixed
16
- - preview maxWidth to limit max width of image
17
- - Added accept attribute to input
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @adminforth/upload" ,
3
- "version" : " 1.0.31-next.1 " ,
3
+ "version" : " 1.0.31" ,
4
4
"description" : " " ,
5
5
"main" : " dist/index.js" ,
6
6
"types" : " dist/index.d.ts" ,
7
+ "repository" : {
8
+ "type" : " git" ,
9
+ "url" : " https://github.com/devforth/adminforth-upload.git"
10
+ },
7
11
"scripts" : {
8
12
"rollout" : " tsc && rsync -av --exclude 'node_modules' custom dist/ && npm version patch && npm publish --access public" ,
9
13
"prepare" : " npm link adminforth" ,
10
14
"rollout-next" : " npm run build && npm version prerelease --preid=next && npm publish --tag next" ,
11
15
"build" : " tsc"
12
16
},
13
17
"type" : " module" ,
14
- "author" : " " ,
18
+ "author" : " devforth " ,
15
19
"license" : " ISC" ,
16
20
"dependencies" : {
17
21
"@aws-sdk/client-s3" : " ^3.629.0" ,
18
22
"@aws-sdk/s3-request-presigner" : " ^3.629.0"
23
+ },
24
+ "release" : {
25
+ "plugins" : [
26
+ " @semantic-release/commit-analyzer" ,
27
+ " @semantic-release/release-notes-generator" ,
28
+ " @semantic-release/npm" ,
29
+ " @semantic-release/github" ,
30
+ [
31
+ " semantic-release-slack-bot" ,
32
+ {
33
+ "notifyOnSuccess" : true ,
34
+ "notifyOnFail" : true ,
35
+ "slackIcon" : " :package:" ,
36
+ "markdownReleaseNotes" : true
37
+ }
38
+ ]
39
+ ],
40
+ "branches" : [
41
+ " main" ,
42
+ {
43
+ "name" : " next" ,
44
+ "prerelease" : true
45
+ }
46
+ ]
19
47
}
20
48
}
You can’t perform that action at this time.
0 commit comments