Skip to content

Commit

Permalink
- ci - add custom-shell-ci hooks to script jslint_ci.sh:
Browse files Browse the repository at this point in the history
    shCiArtifactUploadCustom()
    shCiBaseCustom()
    shCiBaseCustom2()
    shCiLintCustom()
    shCiLintCustom2()
    shCiNpmPublishCustom()
    shCiPreCustom()
    shCiPreCustom2()
  • Loading branch information
kaizhu256 committed Apr 29, 2023
1 parent 08e2d12 commit 96c83b7
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
- jslint - unify analysis of variable-assignment/function-parameters into one function

# v2022.4.1-beta
- ci - add custom-shell-ci hooks to script jslint_ci.sh:
shCiArtifactUploadCustom()
shCiBaseCustom()
shCiBaseCustom2()
shCiLintCustom()
shCiLintCustom2()
shCiNpmPublishCustom()
shCiPreCustom()
shCiPreCustom2()
- ci - housekeeping of ci-file jslint_ci.sh
- ci - update shell-function shGitCommitPushOrSquash() to be able to save to specified filename
- ci - remove little-used shell-function shCiBranchPromote()
Expand Down
37 changes: 32 additions & 5 deletions jslint_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ import moduleChildProcess from "child_process";
});
}());
' "$@" # '
if [ "$(command -v shCiArtifactUploadCustom)" = shCiArtifactUploadCustom ]
if (command -v shCiArtifactUploadCustom >/dev/null)
then
shCiArtifactUploadCustom
fi
Expand Down Expand Up @@ -425,6 +425,9 @@ shCiBase() {(set -e
# shCiBaseCustom() {(set -e
# # this function will run custom-code for base-ci
# return
# )}
# shCiLintCustom2() {(set -e
# # this function will run custom-code to lint files
# )}
export GITHUB_BRANCH0="$(git rev-parse --abbrev-ref HEAD)"
# validate package.json.fileCount
Expand Down Expand Up @@ -554,10 +557,22 @@ import moduleFs from "fs";
}());
' "$@" # '
JSLINT_BETA=1 node jslint.mjs .
if [ "$(command -v shCiBaseCustom)" = shCiBaseCustom ]
if (command -v shCiLintCustom >/dev/null)
then
shCiLintCustom
fi
if (command -v shCiLintCustom2 >/dev/null)
then
shCiLintCustom2
fi
if (command -v shCiBaseCustom >/dev/null)
then
shCiBaseCustom
fi
if (command -v shCiBaseCustom2 >/dev/null)
then
shCiBaseCustom2
fi
git diff
)}

Expand Down Expand Up @@ -593,7 +608,7 @@ shCiNpmPublish() {(set -e
"s|^ \"name\":.*| \"name\": \"@$GITHUB_REPOSITORY\",|" \
package.json
fi
if [ "$(command -v shCiNpmPublishCustom)" = shCiNpmPublishCustom ]
if (command -v shCiNpmPublishCustom >/dev/null)
then
shCiNpmPublishCustom
fi
Expand All @@ -610,10 +625,14 @@ shCiPre() {(set -e
. ./myci2.sh :
shMyciInit
fi
if [ "$(command -v shCiPreCustom)" = shCiPreCustom ]
if (command -v shCiPreCustom >/dev/null)
then
shCiPreCustom
fi
if (command -v shCiPreCustom2 >/dev/null)
then
shCiPreCustom2
fi
)}

shCurlExe() {(set -e
Expand Down Expand Up @@ -3412,8 +3431,16 @@ fi
(set -e
if [ ! "$1" ]
then
return
exit
fi
unset shCiArtifactUploadCustom
unset shCiBaseCustom
unset shCiBaseCustom2
unset shCiLintCustom
unset shCiLintCustom2
unset shCiNpmPublishCustom
unset shCiPreCustom
unset shCiPreCustom2
if [ -f ./myci2.sh ]
then
. ./myci2.sh :
Expand Down

0 comments on commit 96c83b7

Please sign in to comment.