Skip to content

Commit 9a1cc09

Browse files
committed
Merge branch 'feature/action-version-match' into hotfix/v21.4.1
2 parents e0488d5 + f2af7c1 commit 9a1cc09

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/version-check.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version=$(grep "version=" linuxgsm.sh | sed -e 's/version//g'| tr -d '="')
2+
modulesversion=$(grep "modulesversion=" lgsm/functions/core_functions.sh | sed -e 's/modulesversion//g'| tr -d '="')
3+
4+
if [ "${version}" != "${modulesversion}" ]; then
5+
echo "Error! LinuxGSM version mismatch"
6+
echo "Version: ${version}"
7+
echo "Modules Version: ${modulesversion}"
8+
exit 1
9+
else
10+
echo "Success! LinuxGSM version match"
11+
echo "Version: ${version}"
12+
echo "Modules Version: ${modulesversion}"
13+
exit
14+
fi

.github/workflows/version-check.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Version Check
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on: push
8+
9+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
10+
jobs:
11+
# This workflow contains a single job called "build"
12+
Version-Check:
13+
# The type of runner that the job will run on
14+
runs-on: ubuntu-latest
15+
16+
# Steps represent a sequence of tasks that will be executed as part of the job
17+
steps:
18+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
19+
- uses: actions/checkout@v2
20+
21+
# Runs a single command using the runners shell
22+
- name: compare versions
23+
run: chmod +x .github/workflows/version-check.sh; .github/workflows/version-check.sh

0 commit comments

Comments
 (0)