Add parametrized release script
[ci skip]
This commit is contained in:
1 parent
2c60d95ee2
commit
e4126d8d6f
7 files changed
+798
-339
No files matched your search
+651
-318
File diff suppressed because it is too large.
Load diff
@@ -2,6 +2,7 @@
|
||||
|
||||
import argparse
|
||||
from pathlib import Path
|
||||
import json
|
||||
import logging
|
||||
import re
|
||||
import subprocess
|
||||
@@ -10,9 +11,9 @@ ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def determine_project() -> str:
|
||||
text = (ROOT / "CMakeLists.txt").read_text()
|
||||
match = next(re.finditer(r"project\((?P<project>[a-zA-Z0-9_]+)\s+", text, flags=re.M))
|
||||
project_with_version = match["project"]
|
||||
text = (ROOT / "build-scripts/release-info.json").read_text()
|
||||
release_info = json.loads(text)
|
||||
project_with_version = release_info["name"]
|
||||
project, _ = re.subn("([^a-zA-Z_])", "", project_with_version)
|
||||
return project
|
||||
|
||||
|
||||
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"name": "SDL2",
|
||||
"version": {
|
||||
"file": "include/SDL_version.h",
|
||||
"re_major": "^#define SDL_MAJOR_VERSION\\s+([0-9]+)$",
|
||||
"re_minor": "^#define SDL_MINOR_VERSION\\s+([0-9]+)$",
|
||||
"re_micro": "^#define SDL_PATCHLEVEL\\s+([0-9]+)$"
|
||||
},
|
||||
"source": {
|
||||
"checks": [
|
||||
"src/SDL.c",
|
||||
"include/SDL.h",
|
||||
"test/testsprite2.c",
|
||||
"android-project/app/src/main/java/org/libsdl/app/SDLActivity.java"
|
||||
]
|
||||
},
|
||||
"dmg": {
|
||||
"project": "Xcode/SDL/SDL.xcodeproj",
|
||||
"path": "Xcode/SDL/build/SDL2.dmg",
|
||||
"target": "Standard DMG"
|
||||
},
|
||||
"mingw": {
|
||||
"autotools": {
|
||||
"archs": ["x86", "x64"],
|
||||
"args": [
|
||||
]
|
||||
},
|
||||
"files": {
|
||||
"/": [
|
||||
"mingw/pkg-support/INSTALL.txt",
|
||||
"mingw/pkg-support/Makefile",
|
||||
"BUGS.txt",
|
||||
"CREDITS.txt",
|
||||
"README-SDL.txt",
|
||||
"WhatsNew.txt",
|
||||
"LICENSE.txt",
|
||||
"README.md"
|
||||
],
|
||||
"/cmake/": [
|
||||
"mingw/pkg-support/cmake/sdl2-config.cmake",
|
||||
"mingw/pkg-support/cmake/sdl2-config-version.cmake"
|
||||
],
|
||||
"/docs/": [
|
||||
"docs/*"
|
||||
],
|
||||
"/@TRIPLET@/include/SDL2/": [
|
||||
"include/SDL_config*.h"
|
||||
]
|
||||
}
|
||||
},
|
||||
"msvc": {
|
||||
"msbuild": {
|
||||
"archs": [
|
||||
"x86",
|
||||
"x64"
|
||||
],
|
||||
"projects": [
|
||||
"VisualC/SDL/SDL.vcxproj",
|
||||
"VisualC/SDLmain/SDLmain.vcxproj",
|
||||
"VisualC/SDLtest/SDLtest.vcxproj"
|
||||
],
|
||||
"files": [
|
||||
{
|
||||
"lib": "",
|
||||
"devel": "lib/@ARCH@",
|
||||
"paths": [
|
||||
"VisualC/SDL/@PLATFORM@/@CONFIGURATION@/SDL2.dll"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "lib/@ARCH@",
|
||||
"paths": [
|
||||
"VisualC/SDL/@PLATFORM@/@CONFIGURATION@/SDL2.lib",
|
||||
"VisualC/SDL/@PLATFORM@/@CONFIGURATION@/SDL2.pdb",
|
||||
"VisualC/SDLmain/@PLATFORM@/@CONFIGURATION@/SDL2main.lib",
|
||||
"VisualC/SDLtest/@PLATFORM@/@CONFIGURATION@/SDL2test.lib"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
{
|
||||
"devel": "",
|
||||
"lib": "",
|
||||
"paths": [
|
||||
"README-SDL.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "",
|
||||
"paths": [
|
||||
"BUGS.txt",
|
||||
"LICENSE.txt",
|
||||
"README.md",
|
||||
"WhatsNew.txt"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "cmake",
|
||||
"paths": [
|
||||
"VisualC/pkg-support/cmake/sdl2-config.cmake",
|
||||
"VisualC/pkg-support/cmake/sdl2-config-version.cmake"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "docs",
|
||||
"paths": [
|
||||
"docs/*"
|
||||
]
|
||||
},
|
||||
{
|
||||
"devel": "include",
|
||||
"paths": [
|
||||
"include/*.h"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user