Skip to content

Commit

Permalink
Fix release branch in component_release_template.md
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Jan 31, 2024
1 parent 03b8f49 commit 813c7e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/component_release_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ If including changes in this release, increment the version on `{{RELEASE_VERSIO
- [ ] Finalize scope and feature set and update [the Public Roadmap](https://github.com/orgs/opensearch-project/projects/1).
- [ ] All the tasks in this issue have been reviewed by the release owner.
- [ ] Create, update, triage and label all features and issues targeted for this release with `v{{RELEASE_VERSION}}`.
- [ ] Finalize the code and create the the release branch `{{RELEASE_VERSION}}` from the `{{RELEASE_VERSION_X}}` branch.
- [ ] Finalize the code and create the the release branch `{{RELEASE_BRANCH}}` from the `{{RELEASE_VERSION_X}}` branch.

### CI/CD

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/os-release-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ jobs:
# Read the file contents and replace the placeholders
file_path="../opensearch-build/.github/ISSUE_TEMPLATE/component_release_template.md"
RELEASE_VERSION="${{ matrix.release_version }}"
RELEASE_BRANCH=$(echo ${{ matrix.release_version }} | cut -d. -f1-2)
BUILD_REPO_ISSUE_OUTPUT=$(cat <<EOF
${{ steps.check_if_build_repo_issue_exists.outputs.issues }}
EOF
)
RELEASE_ISSUE_NUMBER=$(echo $BUILD_REPO_ISSUE_OUTPUT | jq -r '.[0].number')
RELEASE_ISSUE="https://github.com/opensearch-project/opensearch-build/issues/${RELEASE_ISSUE_NUMBER}"
RELEASE_VERSION_X=$(echo "${{ matrix.release_version }}" | awk -F'.' '{print $1}').x
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_BRANCH}}|${RELEASE_BRANCH}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
- name: Create component release issue from file
if: steps.check_if_plugin_repo_issue_exists.outputs.issues == '[]'
uses: peter-evans/create-issue-from-file@v4
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/osd-release-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,15 @@ jobs:
# Read the file contents and replace the placeholders
file_path="../opensearch-build/.github/ISSUE_TEMPLATE/component_release_template.md"
RELEASE_VERSION="${{ matrix.release_version }}"
RELEASE_BRANCH=$(echo ${{ matrix.release_version }} | cut -d. -f1-2)
BUILD_REPO_ISSUE_OUTPUT=$(cat <<EOF
${{ steps.check_if_build_repo_issue_exists.outputs.issues }}
EOF
)
RELEASE_ISSUE_NUMBER=$(echo $BUILD_REPO_ISSUE_OUTPUT | jq '.[0].number')
RELEASE_ISSUE="https://github.com/opensearch-project/opensearch-build/issues/${RELEASE_ISSUE_NUMBER}"
RELEASE_VERSION_X=$(echo "${{ matrix.release_version }}" | awk -F'.' '{print $1}').x
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_BRANCH}}|${RELEASE_BRANCH}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
- name: Create component release issue from file
if: steps.check_if_plugin_repo_issue_exists.outputs.issues == '[]'
uses: peter-evans/create-issue-from-file@v4
Expand Down

0 comments on commit 813c7e8

Please sign in to comment.