mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-02-28 06:14:56 +00:00
release: don't download pre-release dependencies + strict version parsing
This commit is contained in:
@@ -31,9 +31,11 @@ if(_sdl_major_re AND _sdl_minor_re AND _sdl_micro_re)
|
||||
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
|
||||
else()
|
||||
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
unset(_sdl_version_h)
|
||||
unset(_sdl_version_h_path)
|
||||
unset(_sdl_major_re)
|
||||
unset(_sdl_major)
|
||||
|
||||
@@ -16,6 +16,7 @@ set(_sdl3_version_h "${_sdl3_framework}/Headers/SDL_version.h")
|
||||
|
||||
if(NOT EXISTS "${_sdl3_version_h}")
|
||||
message(AUTHOR_WARNING "Cannot not find ${_sdl3_framework}. This script is meant to be placed in share/cmake/SDL3, next to SDL3.xcframework")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
@@ -36,6 +37,7 @@ if(_sdl_major_re AND _sdl_minor_re AND _sdl_micro_re)
|
||||
set(PACKAGE_VERSION "${_sdl_major}.${_sdl_minor}.${_sdl_micro}")
|
||||
else()
|
||||
message(AUTHOR_WARNING "Could not extract version from SDL_version.h.")
|
||||
set(PACKAGE_VERSION_UNSUITABLE TRUE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
||||
@@ -1127,8 +1127,7 @@ class Releaser:
|
||||
for dep, depinfo in self.release_info.get("dependencies", {}).items():
|
||||
startswith = depinfo["startswith"]
|
||||
dep_repo = depinfo["repo"]
|
||||
# FIXME: dropped "--exclude-pre-releases"
|
||||
dep_string_data = self.executer.check_output(["gh", "-R", dep_repo, "release", "list", "--exclude-drafts", "--json", "name,createdAt,tagName", "--jq", f'[.[]|select(.name|startswith("{startswith}"))]|max_by(.createdAt)']).strip()
|
||||
dep_string_data = self.executer.check_output(["gh", "-R", dep_repo, "release", "list", "--exclude-drafts", "--exclude-pre-releases", "--json", "name,createdAt,tagName", "--jq", f'[.[]|select(.name|startswith("{startswith}"))]|max_by(.createdAt)']).strip()
|
||||
dep_data = json.loads(dep_string_data)
|
||||
dep_tag = dep_data["tagName"]
|
||||
dep_version = dep_data["name"]
|
||||
|
||||
Reference in New Issue
Block a user