Skip to content

Commit

Permalink
Merge pull request #990 from Ana06/github-raw
Browse files Browse the repository at this point in the history
[script/CI] Remove GITHUB_REPO
  • Loading branch information
Ana06 authored Apr 12, 2024
2 parents 17ecefe + 3bfb92f commit 56e5871
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/new_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ body:
`ZIP_EXE` - An executable tool distributed in a ZIP file
`SINGLE_EXE` - An executable tool distributed via direct/raw download
`SINGLE_PS1` - A PowerShell script distributed via direct/raw download
`GITHUB_REPO` - Download a GitHub repository based on a specific commit hash
options:
- ZIP_EXE
- SINGLE_EXE
- SINGLE_PS1
- GITHUB_REPO
- OTHER/UNKNOWN
- type: dropdown
id: console_app
Expand Down
46 changes: 0 additions & 46 deletions scripts/utils/create_package_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,22 +85,6 @@ def package_version(dependency_version):
VM-Install-From-Zip $toolName $category $zipUrl -zipSha256 $zipSha256 -consoleApp ${console_app} -innerFolder ${inner_folder}
"""

"""
Needs the following format strings:
tool_name="...", category="...", target_url="...", target_hash="..."
"""
GITHUB_REPO_TEMPLATE = r"""$ErrorActionPreference = 'Stop'
Import-Module vm.common -Force -DisableNameChecking
$toolName = '{tool_name}'
$category = '{category}'
$zipUrl = '{target_url}'
$zipSha256 = '{target_hash}'
VM-Install-Raw-GitHub-Repo $toolName $category $zipUrl $zipSha256
"""

"""
Needs the following format strings:
tool_name="...", category="...", shim_path="..."
Expand Down Expand Up @@ -179,21 +163,6 @@ def package_version(dependency_version):
"""


def create_git_repo_template(packages_path, **kwargs):
create_template(
GITHUB_REPO_TEMPLATE,
packages_path=packages_path,
pkg_name=kwargs.get("pkg_name"),
version=kwargs.get("version"),
authors=kwargs.get("authors"),
description=kwargs.get("description"),
tool_name=kwargs.get("tool_name"),
category=kwargs.get("category"),
target_url=kwargs.get("target_url"),
target_hash=kwargs.get("target_hash"),
)


def create_zip_exe_template(packages_path, **kwargs):
create_template(
ZIP_EXE_TEMPLATE,
Expand Down Expand Up @@ -374,21 +343,6 @@ def get_script_directory():
"target_hash",
],
},
"GITHUB_REPO": {
"cb": create_git_repo_template,
"doc": "Download a GitHub repository based on a specific commit hash",
"example": "https://github.com/sense-of-security/ADRecon/archive/38e4abae3e26d0fa87281c1d0c65cabd4d3c6ebd.zip",
"arguments": [
"pkg_name",
"version",
"authors",
"description",
"tool_name",
"category",
"target_url",
"target_hash",
],
},
"METAPACKAGE": {
"cb": create_metapackage_template,
"doc": "Install and configure existing packages via dependencies",
Expand Down

0 comments on commit 56e5871

Please sign in to comment.