Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove module version file #247

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate set versions
run: ./validate_versions.sh ${{ github.event.inputs.name }}
- name: Validate the release tag
run: ./validate_release_tag.sh ${{ github.event.inputs.name }}
Comment on lines +28 to +29
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also just re-use the existing script from lifecycle-manager? We could checkout the lifecycle manager and invoke the script from there. Then we would not get unaligned again in the future.

Copy link
Contributor Author

@ruanxin ruanxin Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not a good practice to build dependencies for these two repos just because of reusing this script. IMO, different repos should have their pipeline code. If certain code is worth sharing, then designing it as a customized github action is the right direction. https://docs.github.com/en/actions/sharing-automations

But the functionality of this script is simple, the efforts to publish it as github action is not worth it. Keeping the script separate is also not bad, it allows us to design different validations for both repos if needed in the future.

- name: Validate pipeline status
run: ./validate_pipeline_status.sh ${{ github.ref_name }}

Expand Down
1 change: 0 additions & 1 deletion .version

This file was deleted.

16 changes: 16 additions & 0 deletions scripts/release/validate_release_tag.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

set -o nounset
set -o errexit
set -E
set -o pipefail

CURRENT_RELEASE_TAG=$1

semver_pattern="^([0-9]|[1-9][0-9]*)[.]([0-9]|[1-9][0-9]*)[.]([0-9]|[1-9][0-9]*)(-[a-z][a-z0-9]*)?$"

if ! [[ $CURRENT_RELEASE_TAG =~ $semver_pattern ]]; then
echo "Given tag \"$CURRENT_RELEASE_TAG\" does not match the expected semantic version pattern: \"$semver_pattern\"."
exit 1
fi

22 changes: 0 additions & 22 deletions scripts/release/validate_versions.sh

This file was deleted.

Loading