diff options
| author | crupest <crupest@outlook.com> | 2022-11-30 19:00:08 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-11-30 19:00:08 +0800 | 
| commit | c11b92992e6eebd91d6bbce26b2f407312d05a60 (patch) | |
| tree | 4c2cad5c58d14dc22bd7af0a7ab6aaa1315e8ce5 /tool | |
| parent | 3c918a6096e77190db83c998e777074493515326 (diff) | |
| download | crupest-c11b92992e6eebd91d6bbce26b2f407312d05a60.tar.gz crupest-c11b92992e6eebd91d6bbce26b2f407312d05a60.tar.bz2 crupest-c11b92992e6eebd91d6bbce26b2f407312d05a60.zip  | |
A new way for blog.
Diffstat (limited to 'tool')
| -rwxr-xr-x | tool/aio.py | 13 | 
1 files changed, 13 insertions, 0 deletions
diff --git a/tool/aio.py b/tool/aio.py index 3d44310..1033cb6 100755 --- a/tool/aio.py +++ b/tool/aio.py @@ -112,6 +112,9 @@ dns_parser.add_argument("-i", "--ip", help="IP address of the server.")  git_update_parser = subparsers.add_parser(      "git-update", help="Update git submodules.") +update_blog_parser = subparsers.add_parser( +    "update-blog", help="Update and regenerate blog.") +  up_parser = subparsers.add_parser(      "up", help="Do something necessary and then docker compose up.") @@ -164,6 +167,13 @@ def git_update():      run_in_project_dir(do_it) +def update_blog(): +    def do_it(): +        subprocess.run(["docker", "compose", "exec", +                       "crupest-blog", "/update.bash"], check=True) +    run_in_project_dir(do_it) + +  def docker_compose_up():      def do_docker_compose_up():          subprocess.run(["docker", "compose", "up", "-d"], check=True) @@ -282,6 +292,9 @@ def run():          case "git-update":              git_update() +        case "update-blog": +            update_blog() +          case "up":              git_update()              template_generate(console)  | 
