Auto-update minor revision and date on pull request merge #3

Merged
glavic_a merged 1 commits from new_praction into main 2026-03-02 12:14:00 +01:00
3 changed files with 39 additions and 9 deletions

View File

@@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
python-version: '3.13'
- name: Perform PR auto-action
run: |
python -c "import eos; print(eos.__version__)"
python PR_merged.py

30
PR_merged.py Normal file
View File

@@ -0,0 +1,30 @@
"""
Actions performed automatically on pull request merged. Update changed date and minor revision number.
"""
import os
from eos import __version__
from datetime import datetime
INIT_HEADER = '''"""
Package to handle data redction at AMOR instrument to be used by __main__.py script.
"""
'''
def main():
print("Running PR_merged.py")
print(f" Previous version: {__version__}")
version = __version__.split('.')
version[2] = str(int(version[2])+1)
version = '.'.join(version)
print(f" New version: {version}")
now=datetime.now()
with open(os.path.join('eos','__init__.py'), 'w') as f:
f.write(INIT_HEADER)
f.write(f"__version__ = '{version}'\n")
f.write(f"__date__ = '{now.strftime('%Y-%m-%d')}'\n")
if __name__ == '__main__':
main()

View File

@@ -1,6 +1,6 @@
"""
Package to handle data redction at AMOR instrument to be used by __main__.py script.
"""
__version__ = '3.2.4'
__date__ = '2026-02-27'
"""
Package to handle data redction at AMOR instrument to be used by __main__.py script.
"""
__version__ = '3.2.3'
__date__ = '2026-03-02'