-
Notifications
You must be signed in to change notification settings - Fork 2
chore: use version from tag for release #49
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
Merged
Merged
Changes from 23 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a5c878a
read version from git tag and replace inside of pyproject.toml
MelvinKl 86b0673
Merge branch 'main' into feat/tag_from_release
MelvinKl 3ccbba2
Update cd.yaml
MelvinKl 26bc606
add trigger for release
MelvinKl a649af5
change core version for testing purposes
MelvinKl a7cd2ff
another package another try
MelvinKl 3bb79d1
actuall change the correct property
MelvinKl 72866de
adds workflow for creating tag
MelvinKl 4d43736
another change
MelvinKl 3d5971d
a
1308d4c
simplified
928efdc
simplify
c7a4aad
remove test changes
eb2beb0
simplify
1c40927
simplify
372ae0b
test
stackit-pipeline d5b935c
test
stackit-pipeline f1e55c2
test
stackit-pipeline 3c01737
test
stackit-pipeline 56b7fef
test
stackit-pipeline 3588afb
revise pipeline
stackit-pipeline d6ac040
reset core version
stackit-pipeline 44bcbf3
Merge branch 'main' into feat/tag_from_release
MelvinKl 7b16d89
Merge branch 'main' into feat/tag_from_release
MelvinKl 186fc98
test
MelvinKl 5d25109
test
MelvinKl 3d95d16
add more comments
MelvinKl 87a0cde
Merge branch 'main' into feat/tag_from_release
MelvinKl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Check Version Update | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
check-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Push tag for each updated package | ||
run: | | ||
git config --global user.name "SDK Releaser Bot" | ||
git config --global user.email "noreply@stackit.de" | ||
|
||
for file in $(git diff --name-only HEAD~1..HEAD | grep pyproject.toml); do | ||
if git diff HEAD~1..HEAD $file | grep "version ="; then | ||
version_changes=$(git diff HEAD~1..HEAD $file | grep "version =") | ||
MelvinKl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
splitted_version_changes=($(echo "$version_changes" | grep -oP '(?<=version = )[^ ]*')) | ||
# Check if all versions are equal | ||
if [ $(echo "${splitted_version_changes[@]}" | tr ' ' '\n' | sort -u | wc -l) -ne 1 ]; then | ||
dirpath=$(dirname $file) | ||
current_version=$(grep -o "version = .*" ${file} | cut -d '=' -f 2-) | ||
dirpath=$(dirname $file) | ||
relpath=${file#*/core|stackit/*} | ||
cleaned_version=$(echo "$current_version" | tr -d '" ') | ||
tag=$(echo "${dirpath}/${cleaned_version}") | ||
git tag -a $tag -m "Release $cleaned_version" | ||
git push origin tag $tag | ||
fi | ||
fi | ||
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.