aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLASER-Yi <[email protected]>2021-04-03 10:24:41 +0800
committerLASER-Yi <[email protected]>2021-04-03 10:24:41 +0800
commit193805bbed1a912433759701809035b6a29970e1 (patch)
tree46c05e0fbe84d164bbbaa5f46a283d76538ea59d
parent95bef2d51904c1ab4f296d671236c9c6770be526 (diff)
downloadbazarr-193805bbed1a912433759701809035b6a29970e1.tar.gz
bazarr-193805bbed1a912433759701809035b6a29970e1.zip
no log: Add pre-check script to CI
-rwxr-xr-x.github/scripts/pre_check.sh18
-rw-r--r--.release-it.json7
2 files changed, 22 insertions, 3 deletions
diff --git a/.github/scripts/pre_check.sh b/.github/scripts/pre_check.sh
new file mode 100755
index 000000000..0b283b88c
--- /dev/null
+++ b/.github/scripts/pre_check.sh
@@ -0,0 +1,18 @@
+#! /bin/bash
+# This script is used in release-it as hook
+# Change how this script is triggered by editing .release-it.json
+# NOTE: Please make sure working directory is in root of repo
+
+set -e
+
+file_list=$(cat .github/files_to_copy)
+for f in $file_list
+do
+ echo "**** checking $f ****"
+ if [ ! -f $f ] && [ ! -d $f ]; then
+ echo "**** $f doesn't exist, skipping release ****"
+ exit 1
+ fi
+done
+
+echo "**** pre-check is finished ****" \ No newline at end of file
diff --git a/.release-it.json b/.release-it.json
index bf6dbde6c..df5c9c8f1 100644
--- a/.release-it.json
+++ b/.release-it.json
@@ -14,10 +14,11 @@
"ignoreVersion": true
},
"hooks": {
- "after:git:release": [
+ "before:init": [
"chmod +x .github/scripts/*",
- ".github/scripts/create_asset.sh"
- ]
+ ".github/scripts/pre_check.sh"
+ ],
+ "after:git:release": ".github/scripts/create_asset.sh"
},
"plugins": {
"@release-it/bumper": {