Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
on:
pull_request:
branches:
- dev
- master

name: Check Version

jobs:
all:
runs-on: ubuntu-latest

name: Check Version

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Check version format and availability
run: |
cpp_version=$(sed -n 's/^#define\s\+INDIVIDUAL_VERSION\s\+"\(.*\)"/\1/p' inst/include/individual_version.h)
r_version=$(sed -n 's/^Version: \(.*\)/\1/p' DESCRIPTION)
echo "Version found in individual_version.h: $cpp_version"
echo "Version found in DESCRIPTION: $r_version"
if [[ $cpp_version != $r_version ]]; then
echo "Versions do not match, exiting"
exit 1
fi
1 change: 1 addition & 0 deletions inst/include/individual_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
#include "RaggedDouble.h"
#include "Event.h"
#include "RenderVector.h"
#include "individual_version.h"

#endif /* INDIVIDUAL_TYPES_H_ */
6 changes: 6 additions & 0 deletions inst/include/individual_version.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef INDIVIDUAL_VERSION_H_
#define INDIVIDUAL_VERSION_H_

#define INDIVIDUAL_VERSION "0.1.17"

#endif