Skip to content

Develop

Develop #34

Workflow file for this run

on:
pull_request:
branches: [ master ]
name: Version check
jobs:
Version_bumped:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Master version bumped
shell: bash -l {0}
run: |
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ' | sed 's/"//g')
github_version=$(curl "https://raw.githubusercontent.com/MannLabs/alphatims/master/alphatims/__init__.py" | grep "__version__" | cut -f3 -d ' ')
if [ "$current_version" = "$github_version" ]; then
echo "Version is not updated"
exit 1
fi
- name: Tutorial notebook updated
shell: bash -l {0}
run: |
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ' | sed 's/"//g')
tutorial_version=$(grep "> alphatims" nbs/tutorial_log.txt | head -n 1 | tr -s ' ' | cut -d ' ' -f5)
if [ "$current_version" != "$tutorial_version" ]; then
echo "Version is not updated"
echo "current: $current_version new: $tutorial_version"
exit 1
fi
- name: Performance notebook updated
shell: bash -l {0}
run: |
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ' | sed 's/"//g')
performance_version=$(grep "> alphatims" nbs/performance_log.txt | head -n 1 | tr -s ' ' | cut -d ' ' -f5)
if [ "$current_version" != "$performance_version" ]; then
echo "Version is not updated"
echo "current: $current_version new: $performance_version"
exit 1
fi
- name: Readme updated
shell: bash -l {0}
run: |
echo "Make sure the readme is updated"
current_version=$(grep "__version__" alphatims/__init__.py | cut -f3 -d ' ' | sed 's/"//g')
current_version_as_regex=$(echo $current_version | sed 's/\./\\./g')
count_in_readme=$(grep $current_version_as_regex README.md | wc -l | sed 's/ //g')
if [ $count_in_readme != 2 ]; then
echo "Version does not appear twice (toc and subsection header) in README.md"
exit 1
fi
- name: GUI_manual.pdf updated
shell: bash -l {0}
run: |
echo "make sure the GUI_manual.pdf is updated"
# TODO git does not preserve timestamps, so following is impossible
# if [ misc/gui_manual.docx -nt alphatims/docs/gui_manual.pdf ]; then
# echo "GUI manual was not updated"
# exit 1
# fi
- name: CLI_manual.pdf updated
shell: bash -l {0}
run: |
echo "make sure the CLI_manual.pdf is updated"
# TODO git does not preserve timestamps, so following is impossible
# if [ misc/cli_manual.docx -nt alphatims/docs/cli_manual.pdf ]; then
# echo "CLI manual was not updated"
# exit 1
# fi