Update all non-major dependencies #145
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Merge Requirements | |
on: | |
pull_request: | |
jobs: | |
check-version: | |
name: Ensure version bump | |
runs-on: ubuntu-latest | |
if: ${{ github.base_ref == 'v1' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
- run: | | |
newVersion=$(npm -j list setup-abq | jq -r .version) | |
majorVersion=$(echo $newVersion | awk -F '.' '{print $1}') | |
git fetch && git checkout origin/v1 | |
oldVersion=$(npm -j list setup-abq | jq -r .version) | |
latestVersion=$(echo "$newVersion $oldVersion" | sed 's/\ /\n/' | sort -rV | head -n 1) | |
if [[ "$majorVersion" != "1" ]]; then | |
echo "Major version needs to be '1' on v1 branch" | |
exit 1 | |
fi | |
if [[ $(echo $newVersion | grep "-") ]]; then | |
echo "pre-release versions are not allowed on v1 branch" | |
exit 1 | |
fi | |
if [[ "$newVersion" == "$oldVersion" ]]; then | |
echo "Version number was not changed" | |
exit 1 | |
fi | |
if [[ "$latestVersion" != "$newVersion" ]]; then | |
echo "Version number was not increased" | |
exit 1 | |
fi |