Skip to content

Commit d30fdb7

Browse files
Gem repo template (o3de#5774)
Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
1 parent 199a59e commit d30fdb7

7 files changed

Lines changed: 67 additions & 0 deletions

File tree

Templates/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ ly_install_directory(
1414
DefaultGem
1515
DefaultProject
1616
MinimalProject
17+
GemRepo
1718
VERBATIM
1819
)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"gem_name": "${Name}Gem",
3+
"display_name": "${Name}Gem",
4+
"license": "What license ${Name}Gem uses goes here: i.e. Apache-2.0 Or MIT",
5+
"license_url": "",
6+
"origin": "The primary repo for ${Name}Gem goes here: i.e. http://www.mydomain.com",
7+
"summary": "A short description of ${Name}Gem which is zipped up in an archive named gem.zip in the root of the Gem Repo. Though not required, it is recommended that the sha256 of the gem.zip file should be placed in the sha256 field of this gem.json so the download can be verified.",
8+
"origin_uri": "${RepoURI}/gem.zip",
9+
"sha256": "",
10+
"type": "Code",
11+
"canonical_tags": [
12+
"Gem"
13+
],
14+
"user_tags": [
15+
"${Name}Gem"
16+
],
17+
"icon_path": "preview.png",
18+
"requirements": ""
19+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"repo_name":"${Name}",
3+
"origin":"Origin for the ${Name} Gem Repository",
4+
"repo_uri": "${RepoURI}",
5+
"summary": "A Gem Repository with a single Gem in the root of the repository.",
6+
"additional_info": "Additional info for ${Name}",
7+
"last_updated": "",
8+
"gems": [
9+
"${RepoURI}"
10+
]
11+
}

Templates/GemRepo/preview.png

Lines changed: 3 additions & 0 deletions
Loading

Templates/GemRepo/template.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"template_name": "GemRepo",
3+
"origin": "The primary repo for GemRepo goes here: i.e. http://www.mydomain.com",
4+
"license": "What license GemRepo uses goes here: i.e. https://opensource.org/licenses/MIT",
5+
"display_name": "GemRepo",
6+
"summary": "A Gem Repository that contains a single Gem.",
7+
"canonical_tags": [],
8+
"user_tags": [
9+
"GemRepo"
10+
],
11+
"icon_path": "preview.png",
12+
"copyFiles": [
13+
{
14+
"file": "gem.json",
15+
"origin": "gem.json",
16+
"isTemplated": true,
17+
"isOptional": false
18+
},
19+
{
20+
"file": "repo.json",
21+
"origin": "repo.json",
22+
"isTemplated": true,
23+
"isOptional": false
24+
}
25+
],
26+
"createDirectories": []
27+
}

engine.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
"AutomatedTesting"
9191
],
9292
"templates": [
93+
"Templates/GemRepo",
9394
"Templates/AssetGem",
9495
"Templates/DefaultGem",
9596
"Templates/DefaultProject",

scripts/o3de/o3de/download.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ def validate_downloaded_zip_sha256(download_uri_json_data: dict, download_zip_pa
4848
' We cannot verify this is the actually the advertised object!!!')
4949
return 1
5050
else:
51+
if len(sha256A) == 0:
52+
logger.warning('SECURITY WARNING: The advertised o3de object you downloaded has no "sha256"!!! Be VERY careful!!!'
53+
' We cannot verify this is the actually the advertised object!!!')
54+
return 1
55+
5156
with download_zip_path.open('rb') as f:
5257
sha256B = hashlib.sha256(f.read()).hexdigest()
5358
if sha256A != sha256B:

0 commit comments

Comments
 (0)