mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
fix branch assertation
This commit is contained in:
parent
6db2e4a6ee
commit
277c2d5e97
2
.github/workflows/do_release.yaml
vendored
2
.github/workflows/do_release.yaml
vendored
@ -38,7 +38,7 @@ jobs:
|
|||||||
-H "Authorization: ${{ secrets.GITHUB_TOKEN }}" \
|
-H "Authorization: ${{ secrets.GITHUB_TOKEN }}" \
|
||||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||||
https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \
|
https://api.github.com/repos/inventree/InvenTree/releases/generate-notes \
|
||||||
-d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ github.event.inputs.target }}","previous_tag_name":"${{ steps.version.outputs.old_version }}}","configuration_file_path":".github/release.yml"}')
|
-d '{"tag_name":"${{ steps.version.outputs.tag }}","target_commitish":"${{ steps.version.outputs.old_branch }}","previous_tag_name":"${{ steps.version.outputs.old_version }}}","configuration_file_path":".github/release.yml"}')
|
||||||
echo $auto_text
|
echo $auto_text
|
||||||
echo "auto_text=$auto_text" >> $GITHUB_OUTPUT
|
echo "auto_text=$auto_text" >> $GITHUB_OUTPUT
|
||||||
- name: "Dummy: Set version"
|
- name: "Dummy: Set version"
|
||||||
|
@ -105,14 +105,17 @@ if __name__ == '__main__':
|
|||||||
old_version = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2]}'
|
old_version = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2]}'
|
||||||
if target == 'master':
|
if target == 'master':
|
||||||
tag = f'{highest_tupple[0]}.{highest_tupple[1] + 1}.0'
|
tag = f'{highest_tupple[0]}.{highest_tupple[1] + 1}.0'
|
||||||
|
old_branch = 'master'
|
||||||
elif target == 'stable':
|
elif target == 'stable':
|
||||||
tag = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2] + 1}'
|
tag = f'{highest_tupple[0]}.{highest_tupple[1]}.{highest_tupple[2] + 1}'
|
||||||
|
old_branch = f'{highest_tupple[0]}.{highest_tupple[1]}.x'
|
||||||
else:
|
else:
|
||||||
raise ValueError(f"Unknown target '{target}'")
|
raise ValueError(f"Unknown target '{target}'")
|
||||||
new_tag = f'{tag} dev'
|
new_tag = f'{tag} dev'
|
||||||
|
|
||||||
with open(os.getenv('GITHUB_OUTPUT'), 'a') as env_file:
|
with open(os.getenv('GITHUB_OUTPUT'), 'a') as env_file:
|
||||||
env_file.write(f'old_version={old_version}\n')
|
env_file.write(f'old_version={old_version}\n')
|
||||||
|
env_file.write(f'old_branch={old_branch}\n')
|
||||||
env_file.write(f'tag={tag}\n')
|
env_file.write(f'tag={tag}\n')
|
||||||
env_file.write(f'new_tag={new_tag}\n')
|
env_file.write(f'new_tag={new_tag}\n')
|
||||||
exit(0)
|
exit(0)
|
||||||
|
Loading…
Reference in New Issue
Block a user