-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new action project creation support
- Loading branch information
1 parent
32fc89b
commit 27d9bfe
Showing
5 changed files
with
220 additions
and
3 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import os | ||
|
||
__version__ = "0.7.0" | ||
__version__ = "0.9.0" | ||
# Until DNS is fixed | ||
API_HOST = os.environ.get("GIZA_API_HOST", "https://api.gizatech.xyz") |
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
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,26 @@ | ||
from pathlib import Path | ||
|
||
import typer | ||
from cookiecutter.main import cookiecutter | ||
from slugify import slugify | ||
|
||
from giza.utils import echo | ||
|
||
app = typer.Typer() | ||
|
||
|
||
@app.command() | ||
def new(project_name: str = typer.Argument(...)): | ||
""" | ||
This command will create a new action by generating a Python project. | ||
""" | ||
echo(f"Creating a new Action project with name: {project_name} ✅ ") | ||
cookiecutter( | ||
"gh:gizatechxyz/actions-template", | ||
no_input=True, | ||
extra_context={ | ||
"project_name": project_name, | ||
"project_slug": slugify(project_name, separator="_"), | ||
}, | ||
) | ||
echo(f"Action project created successfully at ./{project_name} ✅") |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "giza-cli" | ||
version = "0.8.0" | ||
version = "0.9.0" | ||
description = "CLI for interacting with Giza" | ||
authors = ["Gonzalo Mellizo-Soto <[email protected]>"] | ||
readme = "README.md" | ||
|
@@ -22,6 +22,7 @@ python-jose = {version = "^3.3.0", extras = ["cryptography"]} | |
email-validator = "^2.0.0.post2" | ||
types-python-jose = "^3.3.4.8" | ||
types-requests = "^2.31.0.2" | ||
cookiecutter = "^2.5.0" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
pre-commit = "^3.3.3" | ||
|