Skip to content

Commit

Permalink
feat(SCRIPTS): markdown link action config
Browse files Browse the repository at this point in the history
  • Loading branch information
niall-byrne committed Mar 6, 2024
1 parent f236b40 commit 1af3d04
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
10 changes: 7 additions & 3 deletions scripts/install-poetry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ main() {
_installer_line_in_file ".gitignore" '.cicd-tools/boxes/*'
_installer_line_in_file ".gitignore" '!.cicd-tools/boxes/bootstrap'

_installer_jinja_render ".github/config/actions/gaurav-nelson-github-action-markdown-link-check.json"
_installer_jinja_render ".github/config/workflows/workflow-push.json"
_installer_jinja_render ".github/scripts/step-setup-environment.sh"
_installer_jinja_render ".github/workflows/workflow-push.yml"
Expand All @@ -48,12 +49,15 @@ main() {
}

_install_args() {
while getopts "d:" OPTION; do
while getopts "d:g:" OPTION; do
case "$OPTION" in
d)
CICD_TOOLS_INSTALL_TARGET_PATH="${OPTARG}"
[[ ! -d "${CICD_TOOLS_INSTALL_TARGET_PATH}" ]] && _install_no_target_path
;;
g)
CICD_TOOLS_GITHUB_HANDLE="${OPTARG}"
;;
\?)
_install_usage
;;
Expand All @@ -67,7 +71,7 @@ _install_args() {
done
shift $((OPTIND - 1))

if [[ -z "${CICD_TOOLS_INSTALL_TARGET_PATH}" ]]; then
if [[ -z "${CICD_TOOLS_INSTALL_TARGET_PATH}" || -z "${CICD_TOOLS_GITHUB_HANDLE}" ]]; then
_install_usage
fi
}
Expand All @@ -79,7 +83,7 @@ _install_no_target_path() {

_install_usage() {
log "ERROR" "install-poetry.sh -- install the bootstrapped CICD-Tools system to an existing poetry repository."
log "ERROR" "USAGE: install-poetry.sh -d [DESTINATION PATH]"
log "ERROR" "USAGE: install-poetry.sh -d [DESTINATION PATH] -g [GITHUB_HANDLE]"
exit 127
}

Expand Down
1 change: 1 addition & 0 deletions scripts/libraries/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ _installer_jinja_render() {
"cookiecutter": {
"optional_toml_linting": "true",
"optional_workflow_linting": "true",
"github_handle": "${CICD_TOOLS_GITHUB_HANDLE}",
"project_slug": "$(basename "${CICD_TOOLS_INSTALL_TARGET_PATH}")",
"_GITHUB_CI_DEFAULT_PYTHON_VERSIONS": ["3.9"],
"_GITHUB_CI_DEFAULT_VERBOSE_NOTIFICATIONS": false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"httpHeaders": [
{
"urls": [
"https://github.com/",
"https://guides.github.com/",
"https://help.github.com/",
"https://docs.github.com/"
],
"headers": {
"Accept-Encoding": "zstd, br, gzip, deflate"
}
}
],
"ignorePatterns": [
{
"pattern": "^https://github.com/{{cookiecutter.github_handle}}/{{cookiecutter.project_slug}}/"
}
]
}

0 comments on commit 1af3d04

Please sign in to comment.