-
-
Notifications
You must be signed in to change notification settings - Fork 247
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
infra: automatically create PR updating developement #7098
base: development
Are you sure you want to change the base?
Conversation
Hey there! Thanks for helping Mudlet improve. 🌟 Test versionsYou can directly test the changes here:
No need to install anything - just unzip and run. |
.github/workflows/build-mudlet.yml
Outdated
echo "set(APP_VERSION ${{ env.APP_VERSION }})" >> CMakeLists.txt | ||
echo "VERSION = ${{ env.VERSION }}" >> src/mudlet.pro | ||
|
||
git add CMakeLists.txt src/mudlet.pro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could be missing something, but does extracting these values and writing them back actually achieve something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extraction and writing back of values were intended for a scenario where you needed to dynamically update version numbers in your files based on the extracted values.
Dont i need them?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @vadi2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow. Mind rephrasing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vadi2 so i should extract version
and app_version
from the release event right?
.github/workflows/build-mudlet.yml
Outdated
|
||
gh pr create --base development --head update-development-${{ github.run_number }} --title "Update development-${{ github.run_number }}" --body "Automatically generated PR to update development with release ${{ env.APP_VERSION }} " | ||
|
||
git checkout developement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this line needed? There's a typo here also.
@vadi2 completely revamp my pr. Can you take a look |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR does not really set the version information in the right places. It rather appends new values for variables at the end of the files after they have been used.
Additionally, this needs to happen before a git tag is set, so the trigger is wrong. But to be fair, that information is missing in the original issue.
.github/workflows/create-pr.yml
Outdated
VERSION=$APP_VERSION | ||
echo "Extracted VERSION: $VERSION" | ||
echo "VERSION=$VERSION" >> $GITHUB_ENV | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block is completely unnecessary since you can just re-use the variable created above.
.github/workflows/create-pr.yml
Outdated
echo "set(APP_VERSION ${{ env.APP_VERSION }})" >> CMakeLists.txt | ||
echo "VERSION = ${{ env.VERSION }}" >> src/mudlet.pro |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines will append the versions to the "Makefiles". However this will not replace the current versions that are used within code and the files themselves. Rather, you'd have to replace the current variable content at the position it is right now.
@keneanung can you review it once i have covered all the points that you have mentioned |
In the pr the workflow is triggered by a cc @keneanung |
The logic seems to be better now and replace the Mudlet version numbers. However, I don't think the trigger is correct. But we have two competing PRs/claims on this bounty and the question was raised by the other party as well. I will attempt to answer this in the issue #6101 so it is visible to all parties. Edit: #6101 (comment) point 1 should answer the trigger question |
@keneanung can you review it once now |
can you review it once |
This looks about to be right. However, we are currently discussing if we need to re-define the bounties. We noticed there are certain overlaps and need to define borders more clearly. |
ok lemme know about that |
closes #6101
/claim #6101