diff --git a/CMakeLists.txt b/CMakeLists.txt index b1ac5d02..5235356b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,11 +27,13 @@ if(JSONSCHEMA_TESTS) 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}") +if(EXISTS "${PROJECT_SOURCE_DIR}/action.yml") + 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() endif() # Packaging diff --git a/Dockerfile b/Dockerfile index 518406a1..cc1f99d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,12 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends tz # Tools to compile: RUN apt install -y build-essential cmake clang-format shellcheck curl -COPY . /compile +COPY cmake /compile/cmake +COPY src /compile/src +COPY test /compile/test +COPY vendor /compile/vendor +COPY CMakeLists.txt /compile/CMakeLists.txt +COPY Makefile /compile/Makefile WORKDIR /compile RUN make configure @@ -18,4 +23,4 @@ RUN make compile FROM ubuntu COPY --from=compiler /compile/build/dist/bin/jsonschema /usr/local/bin/jsonschema WORKDIR /schema -ENTRYPOINT ["/usr/local/bin/jsonschema"] \ No newline at end of file +ENTRYPOINT ["/usr/local/bin/jsonschema"]