We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d409a8e commit 97020f8Copy full SHA for 97020f8
scripts/schema-publish.sh
@@ -7,10 +7,19 @@
7
schemaDir="src/schemas/validation"
8
branch=$(git branch --show-current)
9
10
-if [[ $branch =~ ^v([0-9]+\.[0-9]+)-dev$ ]]; then
11
- deploydir="./deploy/oas/${BASH_REMATCH[1]}"
12
-else
+
+if [ -z "$1" ]; then
+ if [[ $branch =~ ^v([0-9]+\.[0-9]+)-dev$ ]]; then
13
+ deploydir="./deploy/oas/${BASH_REMATCH[1]}"
14
+ else
15
+ echo "Unable to determine version from branch name; should be vMAJOR.MINOR.PATCH-dev"
16
+ exit 1
17
+ fi
18
+elif [ $1 = "src" ]; then
19
deploydir="./deploy-preview"
20
+else
21
+ echo "Unrecognized argument"
22
23
fi
24
25
# create the date-stamped schemas
0 commit comments