Reject prohibited artifacts during CMake staging
This commit is contained in:
@@ -41,6 +41,29 @@ if(NOT "${_preserve_admin_token}" STREQUAL "")
|
|||||||
file(WRITE "${_stage_admin_token}" "${_preserve_admin_token}")
|
file(WRITE "${_stage_admin_token}" "${_preserve_admin_token}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
file(GLOB_RECURSE _prohibited_legacy_files
|
||||||
|
LIST_DIRECTORIES false
|
||||||
|
"${CO_SERVER_STAGE_DIR}/*.py"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/*.pyw"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/*.pyi"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/*.pyc"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/*.pyo"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/*.whl"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/*.egg"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/requirements*.txt"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/Pipfile"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/Pipfile.lock"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/pyproject.toml"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/poetry.lock"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/setup.py"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/setup.cfg"
|
||||||
|
"${CO_SERVER_STAGE_DIR}/tox.ini"
|
||||||
|
)
|
||||||
|
if(_prohibited_legacy_files)
|
||||||
|
string(JOIN "\n " _prohibited_list ${_prohibited_legacy_files})
|
||||||
|
message(FATAL_ERROR "Prohibited legacy runtime artifacts were staged:\n ${_prohibited_list}")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT EXISTS "${CO_SERVER_STAGE_DIR}/CommonwealthOnline.Server${CO_SERVER_EXECUTABLE_SUFFIX}")
|
if(NOT EXISTS "${CO_SERVER_STAGE_DIR}/CommonwealthOnline.Server${CO_SERVER_EXECUTABLE_SUFFIX}")
|
||||||
message(FATAL_ERROR "Failed to stage C# server entrypoint")
|
message(FATAL_ERROR "Failed to stage C# server entrypoint")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user