-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (29 loc) · 925 Bytes
/
Copy pathcheck-requires-bump.yml
File metadata and controls
35 lines (29 loc) · 925 Bytes
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
name: Check Requires Bump
on:
pull_request:
branches: [ "main", "*.*.x" ]
paths:
- 'cassini/*'
- 'tests/*'
- 'pyproject.toml'
permissions:
contents: read
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: check version bumped
shell: bash
run: |
echo "Detected internal changes, checking version number has been bumped"
CURRENT_VERSION=$(git show origin/${{ github.base_ref }}:pyproject.toml | grep -E ^version | grep -Eo \".+\")
echo "current" $CURRENT_VERSION
THIS_VERSION=$(git show HEAD:pyproject.toml | grep -E ^version | grep -Eo \".+\")
echo "this" $THIS_VERSION
if [[ $CURRENT_VERSION == $THIS_VERSION ]]; then
echo "Versions match but internal changes have been made, bump required"
exit 1
fi