Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardcode JSON Schema version in action.yml #52

Merged
merged 1 commit into from
Jun 3, 2024
Merged
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
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ if(JSONSCHEMA_TESTS)
add_subdirectory(test)
endif()

# As a sanity check
file(READ "${PROJECT_SOURCE_DIR}/action.yml" ACTION_YML)
string(FIND "${ACTION_YML}" "${PROJECT_VERSION}" ACTION_YML_HAS_VERSION)
if(${ACTION_YML_HAS_VERSION} EQUAL -1)
message(FATAL_ERROR
"The GitHub Action definition must set the correct version: ${PROJECT_VERSION}")
endif ()

# Packaging
find_program(GIT_BIN NAMES git)
if(GIT_BIN AND JSONSCHEMA_CONTINUOUS)
Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTING.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ Releasing

```sh
git checkout main

# Update the VERSION in CMakeLists.txt
vim CMakeLists.txt
git add CMakeLists.txt
# Update the version in action.yml
vim action.yml

git add CMakeLists.txt action.yml
git commit -m "vX.Y.Z"
git tag -a "vX.Y.Z" -m "vX.Y.Z"
git push
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ runs:
--output "${GITHUB_WORKSPACE}/install.sh" \
"https://raw.githubusercontent.com/intelligence-ai/jsonschema/main/install"
chmod +x "${GITHUB_WORKSPACE}/install.sh"
"${GITHUB_WORKSPACE}/install.sh" "${GITHUB_REF#refs/tags/v}"
"${GITHUB_WORKSPACE}/install.sh" 0.1.3
rm "${GITHUB_WORKSPACE}/install.sh"