Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions scripts/docs-release-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
base_ref="main"
ref_name="not-docs-123"

# If it's merging into main, it MUST be a feature branch

# If it's merging into something other than main, then it needs to be the feature branch
if [[ $base_ref == aws-docs-* || $base_ref == snowflake-docs-* ]]; then
echo "Merging to a feature branch, all good!"
exit 0
fi

if [[ $base_ref == 'main' && ($ref_name == aws-docs-* || $ref_name == snowflake-docs-*) ]]; then
echo "All good, it's a valid branch to merge to main"
exit 0
fi


echo "All PRs need to be merged into main or a feature branch"
exit 1