Gem repo template (#5774)

Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
monroegm-disable-blank-issue-2
Alex Peterson 4 years ago committed by GitHub
parent 199a59e8f9
commit d30fdb759d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -14,5 +14,6 @@ ly_install_directory(
DefaultGem
DefaultProject
MinimalProject
GemRepo
VERBATIM
)

@ -0,0 +1,19 @@
{
"gem_name": "${Name}Gem",
"display_name": "${Name}Gem",
"license": "What license ${Name}Gem uses goes here: i.e. Apache-2.0 Or MIT",
"license_url": "",
"origin": "The primary repo for ${Name}Gem goes here: i.e. http://www.mydomain.com",
"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.",
"origin_uri": "${RepoURI}/gem.zip",
"sha256": "",
"type": "Code",
"canonical_tags": [
"Gem"
],
"user_tags": [
"${Name}Gem"
],
"icon_path": "preview.png",
"requirements": ""
}

@ -0,0 +1,11 @@
{
"repo_name":"${Name}",
"origin":"Origin for the ${Name} Gem Repository",
"repo_uri": "${RepoURI}",
"summary": "A Gem Repository with a single Gem in the root of the repository.",
"additional_info": "Additional info for ${Name}",
"last_updated": "",
"gems": [
"${RepoURI}"
]
}

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ae503ec99c8358991dc3c6e50737844d3602b81a49abbbed7d697d7238547c0
size 28026

@ -0,0 +1,27 @@
{
"template_name": "GemRepo",
"origin": "The primary repo for GemRepo goes here: i.e. http://www.mydomain.com",
"license": "What license GemRepo uses goes here: i.e. https://opensource.org/licenses/MIT",
"display_name": "GemRepo",
"summary": "A Gem Repository that contains a single Gem.",
"canonical_tags": [],
"user_tags": [
"GemRepo"
],
"icon_path": "preview.png",
"copyFiles": [
{
"file": "gem.json",
"origin": "gem.json",
"isTemplated": true,
"isOptional": false
},
{
"file": "repo.json",
"origin": "repo.json",
"isTemplated": true,
"isOptional": false
}
],
"createDirectories": []
}

@ -90,6 +90,7 @@
"AutomatedTesting"
],
"templates": [
"Templates/GemRepo",
"Templates/AssetGem",
"Templates/DefaultGem",
"Templates/DefaultProject",

@ -48,6 +48,11 @@ def validate_downloaded_zip_sha256(download_uri_json_data: dict, download_zip_pa
' We cannot verify this is the actually the advertised object!!!')
return 1
else:
if len(sha256A) == 0:
logger.warning('SECURITY WARNING: The advertised o3de object you downloaded has no "sha256"!!! Be VERY careful!!!'
' We cannot verify this is the actually the advertised object!!!')
return 1
with download_zip_path.open('rb') as f:
sha256B = hashlib.sha256(f.read()).hexdigest()
if sha256A != sha256B:

Loading…
Cancel
Save