-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add pre-commit to check app name registered or not
- Loading branch information
1 parent
a95b5b1
commit e0a0402
Showing
3 changed files
with
31 additions
and
0 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
13 changes: 13 additions & 0 deletions
13
{{cookiecutter.project_slug}}/scripts/check-registered-app-pre-commit.sh
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,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
# taken from: https://jaredkhan.com/blog/mypy-pre-commit | ||
|
||
# A script for running mypy, | ||
# with all its dependencies installed. | ||
|
||
set -o errexit | ||
|
||
# Change directory to the project root directory. | ||
cd "$(dirname "$0")"/.. | ||
|
||
./scripts/check-registered-app.sh |
8 changes: 8 additions & 0 deletions
8
{{cookiecutter.project_slug}}/scripts/check-registered-app.sh
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,8 @@ | ||
#!/bin/bash | ||
|
||
# Check file registered_app_domain.txt exists. If it does not exists, echo and exit. | ||
if [ ! -f registered_app_domain.txt ]; then | ||
echo -e "\033[0;33mWarning: App name is not registered.\033[0m" | ||
echo -e "\033[0;33mGithub Actions may fail if you push without registering.\033[0m" | ||
echo -e "\033[0;33mRegister your app name by running the script 'scripts/register_to_fly_io.sh'.\033[0m" | ||
fi |