Skip to content

Commit 95686a5

Browse files
authored
Hardcode JSON Schema version in action.yml (#52)
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
1 parent 8db8e40 commit 95686a5

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ if(JSONSCHEMA_TESTS)
2626
add_subdirectory(test)
2727
endif()
2828

29+
# As a sanity check
30+
file(READ "${PROJECT_SOURCE_DIR}/action.yml" ACTION_YML)
31+
string(FIND "${ACTION_YML}" "${PROJECT_VERSION}" ACTION_YML_HAS_VERSION)
32+
if(${ACTION_YML_HAS_VERSION} EQUAL -1)
33+
message(FATAL_ERROR
34+
"The GitHub Action definition must set the correct version: ${PROJECT_VERSION}")
35+
endif ()
36+
2937
# Packaging
3038
find_program(GIT_BIN NAMES git)
3139
if(GIT_BIN AND JSONSCHEMA_CONTINUOUS)

CONTRIBUTING.markdown

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ Releasing
2323

2424
```sh
2525
git checkout main
26+
2627
# Update the VERSION in CMakeLists.txt
2728
vim CMakeLists.txt
28-
git add CMakeLists.txt
29+
# Update the version in action.yml
30+
vim action.yml
31+
32+
git add CMakeLists.txt action.yml
2933
git commit -m "vX.Y.Z"
3034
git tag -a "vX.Y.Z" -m "vX.Y.Z"
3135
git push

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ runs:
1010
--output "${GITHUB_WORKSPACE}/install.sh" \
1111
"https://raw.githubusercontent.com/intelligence-ai/jsonschema/main/install"
1212
chmod +x "${GITHUB_WORKSPACE}/install.sh"
13-
"${GITHUB_WORKSPACE}/install.sh" "${GITHUB_REF#refs/tags/v}"
13+
"${GITHUB_WORKSPACE}/install.sh" 0.1.3
1414
rm "${GITHUB_WORKSPACE}/install.sh"

0 commit comments

Comments
 (0)