-
Notifications
You must be signed in to change notification settings - Fork 26
70 lines (68 loc) · 2.93 KB
/
version_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
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