generated from OpenGOAL-Mods/OG-Mod-Base
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
813 additions
and
360 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Generated via typescript definitions: | ||
|
||
```bash | ||
npx ts-json-schema-generator --path './*.ts' --type 'ModMetadata' > mod-schema.v1.json | ||
``` | ||
|
||
And then some value validations added on mostly for valid semver checking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
{ | ||
"$ref": "#/definitions/ModMetadata", | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"definitions": { | ||
"ModMetadata": { | ||
"additionalProperties": false, | ||
"properties": { | ||
"publishedDate": { | ||
"type": "string" | ||
}, | ||
"schemaVersion": { | ||
"description": "Semantic Version", | ||
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", | ||
"type": "string" | ||
}, | ||
"supportedGames": { | ||
"items": { | ||
"enum": [ | ||
"jak1", | ||
"jak2", | ||
"jak3", | ||
"jakx" | ||
], | ||
"type": "string" | ||
}, | ||
"type": "array" | ||
}, | ||
"version": { | ||
"description": "Semantic Version", | ||
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", | ||
"type": "string" | ||
} | ||
}, | ||
"required": [ | ||
"schemaVersion", | ||
"version", | ||
"publishedDate", | ||
"supportedGames" | ||
], | ||
"type": "object" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// interface ChangelogEntry { | ||
// summary: string, | ||
// timestamp: string, | ||
// authors?: string[], | ||
// description?: string, | ||
// } | ||
|
||
/** | ||
* Semantic Version | ||
* @pattern ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$ | ||
*/ | ||
type Semver = string; | ||
|
||
type SupportedGame = "jak1" | "jak2" | "jak3" | "jakx"; | ||
|
||
export interface ModMetadata { | ||
schemaVersion: Semver; | ||
version: Semver; | ||
publishedDate: string; | ||
supportedGames: SupportedGame[]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from common import ( | ||
create_output_dir, | ||
download_release, | ||
finalize_bundle, | ||
get_args, | ||
override_binaries_and_assets, | ||
patch_mod_timestamp_and_version_info, | ||
) | ||
|
||
args = get_args("linux") | ||
|
||
print(args) | ||
|
||
# Create our output directory | ||
create_output_dir(args, "linux") | ||
|
||
# Download the Release | ||
download_release(args, "linux", is_zip=False) | ||
|
||
# Override any files | ||
override_binaries_and_assets(args, "linux") | ||
|
||
# Replace placeholder text with mod version and timestamp | ||
patch_mod_timestamp_and_version_info(args, "linux") | ||
|
||
# Rezip it up and prepare it for upload | ||
finalize_bundle(args, "linux", is_zip=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from common import ( | ||
create_output_dir, | ||
download_release, | ||
finalize_bundle, | ||
get_args, | ||
override_binaries_and_assets, | ||
patch_mod_timestamp_and_version_info, | ||
) | ||
|
||
args = get_args("macos-intel") | ||
|
||
print(args) | ||
|
||
# Create our output directory | ||
create_output_dir(args, "macos-intel") | ||
|
||
# Download the Release | ||
download_release(args, "macos-intel", is_zip=False) | ||
|
||
# Override any files | ||
override_binaries_and_assets(args, "macos-intel") | ||
|
||
# Replace placeholder text with mod version and timestamp | ||
patch_mod_timestamp_and_version_info(args, "macos-intel") | ||
|
||
# Rezip it up and prepare it for upload | ||
finalize_bundle(args, "macos-intel", is_zip=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from common import ( | ||
create_output_dir, | ||
download_release, | ||
finalize_bundle, | ||
get_args, | ||
override_binaries_and_assets, | ||
patch_mod_timestamp_and_version_info, | ||
) | ||
|
||
args = get_args("windows") | ||
|
||
print(args) | ||
|
||
# Create our output directory | ||
create_output_dir(args, "windows") | ||
|
||
# Download or Build the Release | ||
download_release(args, "windows", is_zip=True) | ||
|
||
# Override any files | ||
override_binaries_and_assets(args, "windows") | ||
|
||
# Replace placeholder text with mod version and timestamp | ||
patch_mod_timestamp_and_version_info(args, "windows") | ||
|
||
# Rezip it up and prepare it for upload | ||
finalize_bundle(args, "windows", is_zip=True) |
Oops, something went wrong.