Skip to content

Commit

Permalink
Add version check test
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexRuiz7 committed Aug 21, 2024
1 parent c444752 commit 7b74df4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/version_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Version check

on:
push:
paths:
- "VERSION"

jobs:
check-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check version
run: bash packaging_scripts/check_version.sh
11 changes: 11 additions & 0 deletions packaging_scripts/check_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Check if VERSION file has exactly one line and that line is non-empty
if [ "$(wc -l <VERSION)" -ne 0 ]; then
echo "Error: VERSION file must contain exactly one line."
exit 1
fi
if [ -z "$(cat VERSION)" ]; then
echo "Error: VERSION file is empty."
exit 1
fi

0 comments on commit 7b74df4

Please sign in to comment.