From 9181b3a021acc7585cb6f9f20da6accfce0015e0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 31 Jul 2021 10:16:38 +0300 Subject: merge my_repos.py to the config The config is also in the TOML format now. It's a bit messy for the moment, but I'll fix it. --- .ci/docker/client/etc/cgitize.toml | 4 ++++ .ci/docker/client/etc/my_repos.py | 6 ------ .ci/local/test.sh | 43 ++++++++++---------------------------- 3 files changed, 15 insertions(+), 38 deletions(-) create mode 100644 .ci/docker/client/etc/cgitize.toml delete mode 100644 .ci/docker/client/etc/my_repos.py (limited to '.ci') diff --git a/.ci/docker/client/etc/cgitize.toml b/.ci/docker/client/etc/cgitize.toml new file mode 100644 index 0000000..bc46aca --- /dev/null +++ b/.ci/docker/client/etc/cgitize.toml @@ -0,0 +1,4 @@ +[repositories.test_repo] + +id = "test_repo" +clone_url = "root@server:~/test_repo" diff --git a/.ci/docker/client/etc/my_repos.py b/.ci/docker/client/etc/my_repos.py deleted file mode 100644 index 58cf542..0000000 --- a/.ci/docker/client/etc/my_repos.py +++ /dev/null @@ -1,6 +0,0 @@ -from cgitize.repo import Repo - - -MY_REPOS = ( - Repo('test_repo', clone_url='root@server:~/test_repo'), -) diff --git a/.ci/local/test.sh b/.ci/local/test.sh index 8ae7fe9..8826ff4 100755 --- a/.ci/local/test.sh +++ b/.ci/local/test.sh @@ -8,8 +8,7 @@ readonly script_dir upstream_repo_dir= readonly etc_dir="$script_dir/etc" -readonly cgitize_conf_path="$etc_dir/cgitize.conf" -readonly my_repos_path="$etc_dir/my_repos.py" +readonly cgitize_toml_path="$etc_dir/cgitize.toml" readonly output_dir="$script_dir/output" cleanup() { @@ -61,47 +60,27 @@ add_commits() { popd > /dev/null } -setup_cgitize_conf() { +setup_cgitize_toml() { echo echo ---------------------------------------------------------------------- - echo cgitize.conf + echo cgitize.toml echo ---------------------------------------------------------------------- local conf_dir - conf_dir="$( dirname -- "$cgitize_conf_path" )" + conf_dir="$( dirname -- "$cgitize_toml_path" )" mkdir -p -- "$conf_dir" - cat <