-
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.
feat(postgresql): Add initial docs builders for postgresql
- Loading branch information
Showing
5 changed files
with
87 additions
and
2 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
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 @@ | ||
../../../utilities/scripts/python |
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,45 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import python.cli as cli | ||
import python.db_ops as db_ops | ||
import argparse | ||
import rich | ||
|
||
def main(): | ||
# Force color output in CI | ||
rich.reconfigure(color_system='256') | ||
|
||
parser = argparse.ArgumentParser(description='Standard Postgresql Documentation Processing.') | ||
parser.add_argument('container_name', help='Name of the container') | ||
parser.add_argument('--verbose', action='store_true', help='Enable verbose output') | ||
db_ops.add_args(parser) | ||
|
||
args = parser.parse_args() | ||
|
||
db = db_ops.DBOps(args) | ||
|
||
results = cli.Results("Generate Database Documentation") | ||
|
||
# Init the DB. | ||
res = db.init_database() | ||
results.add(res) | ||
|
||
if res.ok(): | ||
db.start() | ||
res = db.wait_ready(timeout=10) | ||
results.add(res) | ||
|
||
if res.ok(): | ||
res = db.setup() | ||
results.add(res) | ||
|
||
if res.ok(): | ||
res = db.migrate_schema() | ||
results.add(res) | ||
|
||
|
||
results.print() | ||
|
||
|
||
if __name__ == '__main__': | ||
main() |
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
Empty file.