From 607bbc2170d3b98949f2e5d80dd0d6bbdea1aecd Mon Sep 17 00:00:00 2001 From: Kevin Broch Date: Wed, 6 Nov 2024 07:24:00 -0800 Subject: [PATCH] simply down to 1 manifest; add proj group --- _common.xml | 1 - all-rvi-orgs.xml | 1 - default.xml | 2 +- projects/rvi-repo-manifest/Makefile | 11 +- projects/rvi-repo-manifest/README.adoc | 16 +- projects/rvi-repo-manifest/_common.xml | 5 - .../rvi-repo-manifest/generate-manifests.sh | 7 +- .../rvi-repo-manifest/generated/_common.xml | 5 - .../generated/all-rvi-orgs.xml | 344 ----------------- .../rvi-repo-manifest/generated/default.xml | 345 ++++++++++++++++++ .../generated/riscv-admin.xml | 104 ------ .../generated/riscv-android-src.xml | 136 ------- .../generated/riscv-collab.xml | 11 - .../generated/riscv-non-isa.xml | 41 --- .../generated/riscv-software-src.xml | 23 -- .../rvi-repo-manifest/generated/riscv.xml | 59 --- riscv-admin.xml | 1 - riscv-android-src.xml | 1 - riscv-collab.xml | 1 - riscv-non-isa.xml | 1 - riscv-software-src.xml | 1 - riscv.xml | 1 - 22 files changed, 368 insertions(+), 749 deletions(-) delete mode 120000 _common.xml delete mode 120000 all-rvi-orgs.xml delete mode 100644 projects/rvi-repo-manifest/_common.xml delete mode 100644 projects/rvi-repo-manifest/generated/_common.xml delete mode 100644 projects/rvi-repo-manifest/generated/all-rvi-orgs.xml create mode 100644 projects/rvi-repo-manifest/generated/default.xml delete mode 100644 projects/rvi-repo-manifest/generated/riscv-admin.xml delete mode 100644 projects/rvi-repo-manifest/generated/riscv-android-src.xml delete mode 100644 projects/rvi-repo-manifest/generated/riscv-collab.xml delete mode 100644 projects/rvi-repo-manifest/generated/riscv-non-isa.xml delete mode 100644 projects/rvi-repo-manifest/generated/riscv-software-src.xml delete mode 100644 projects/rvi-repo-manifest/generated/riscv.xml delete mode 120000 riscv-admin.xml delete mode 120000 riscv-android-src.xml delete mode 120000 riscv-collab.xml delete mode 120000 riscv-non-isa.xml delete mode 120000 riscv-software-src.xml delete mode 120000 riscv.xml diff --git a/_common.xml b/_common.xml deleted file mode 120000 index 3f259d3..0000000 --- a/_common.xml +++ /dev/null @@ -1 +0,0 @@ -projects/rvi-repo-manifest/generated/_common.xml \ No newline at end of file diff --git a/all-rvi-orgs.xml b/all-rvi-orgs.xml deleted file mode 120000 index 87f944a..0000000 --- a/all-rvi-orgs.xml +++ /dev/null @@ -1 +0,0 @@ -projects/rvi-repo-manifest/generated/all-rvi-orgs.xml \ No newline at end of file diff --git a/default.xml b/default.xml index 87f944a..1af3116 120000 --- a/default.xml +++ b/default.xml @@ -1 +1 @@ -projects/rvi-repo-manifest/generated/all-rvi-orgs.xml \ No newline at end of file +projects/rvi-repo-manifest/generated/default.xml \ No newline at end of file diff --git a/projects/rvi-repo-manifest/Makefile b/projects/rvi-repo-manifest/Makefile index d3735d9..5def8f1 100644 --- a/projects/rvi-repo-manifest/Makefile +++ b/projects/rvi-repo-manifest/Makefile @@ -9,29 +9,24 @@ ORGS := \ TOOL := ./generate-manifests.sh BUILD_DIR := generated -ALL_ORGS_XML := all-rvi-orgs.xml +ALL_ORGS_XML := default.xml ORGS_XML := $(addsuffix .xml, $(ORGS)) .PHONY: build-xml build-all-rvi-orgs-xml -default: build-xml $(ALL_ORGS_XML) +all: $(ALL_ORGS_XML) build-xml: $(MAKE) $(ORGS_XML) -all-orgs-xml: +$(ALL_ORGS_XML): $(TOOL) $(BUILD_DIR)/$(ALL_ORGS_XML) $(ORGS) - cp _common.xml $(BUILD_DIR)/. %.xml: $(TOOL) $(BUILD_DIR)/$@ $* - cp _common.xml $(BUILD_DIR)/. clean: - rm -rf $(BUILD_DIR/*.xml) - -clean-all: rm -rf $(BUILD_DIR) # Debug variables diff --git a/projects/rvi-repo-manifest/README.adoc b/projects/rvi-repo-manifest/README.adoc index 952b1dd..5d7ab52 100644 --- a/projects/rvi-repo-manifest/README.adoc +++ b/projects/rvi-repo-manifest/README.adoc @@ -25,14 +25,28 @@ Although manifest files can be created manually, a bash script is used here to d ==== Using git `repo` tool +===== `repo init` + Similarly to cloning a single repo, the first step in using `repo` is to link:https://source.android.com/docs/setup/reference/repo#init[initialize] a directory with the configuration (manifest file). This should be done in an empty dir. +There is only one `default.xml` manifest file that has been created. It contains all the projects of all the orgs that RVI uses. To filter down by organization or projects, use the `--groups=` feature of the `repo init` command. + +Here's an example: [source, bash] ---- mkdir rvi-repos && cd rvi-repos -repo init -u https://github.com/riscv-admin/docs-sig -g all,-riscv-android-src +repo init -u https://github.com/riscv-admin/docs-sig --groups=all,-org:riscv-android-src ---- +NOTES: +* If a `--manifest` isn't provided, `default.xml` is assumed +* `--groups=all` is a special group to check out all +* If a `-` is used in front of a group, negates its use + +==== `repo sync` + +After `repo init` is done once, `repo sync` can be used to clone the initial repos and keep them sync'ed with upstream in the future. + === Pros and cons * Pros diff --git a/projects/rvi-repo-manifest/_common.xml b/projects/rvi-repo-manifest/_common.xml deleted file mode 100644 index 8ad60d9..0000000 --- a/projects/rvi-repo-manifest/_common.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/projects/rvi-repo-manifest/generate-manifests.sh b/projects/rvi-repo-manifest/generate-manifests.sh index 5604263..ccd4d11 100755 --- a/projects/rvi-repo-manifest/generate-manifests.sh +++ b/projects/rvi-repo-manifest/generate-manifests.sh @@ -41,7 +41,8 @@ xml_header=' - ' + + ' echo "$xml_header" > "$output_file" @@ -50,7 +51,7 @@ for org in $org_list; do echo "Fetching repositories for organization: $org" # Get list of repositories for the organization - repos=$(gh repo list -L $MAX_REPOS --no-archived --source $org --json name --jq '.[].name') + repos=$(gh repo list -L $MAX_REPOS --no-archived --source $org --json name --jq '.[].name' | sort) # Loop through each repository for repo in $repos; do @@ -60,7 +61,7 @@ for org in $org_list; do default_branch=$(echo $repo_info | jq -r '.db') # Add repository information to the XML file - repo_entry=" " + repo_entry=" " echo "$repo_entry" >> $output_file done done diff --git a/projects/rvi-repo-manifest/generated/_common.xml b/projects/rvi-repo-manifest/generated/_common.xml deleted file mode 100644 index 8ad60d9..0000000 --- a/projects/rvi-repo-manifest/generated/_common.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/projects/rvi-repo-manifest/generated/all-rvi-orgs.xml b/projects/rvi-repo-manifest/generated/all-rvi-orgs.xml deleted file mode 100644 index d696b3b..0000000 --- a/projects/rvi-repo-manifest/generated/all-rvi-orgs.xml +++ /dev/null @@ -1,344 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/rvi-repo-manifest/generated/default.xml b/projects/rvi-repo-manifest/generated/default.xml new file mode 100644 index 0000000..239c1e1 --- /dev/null +++ b/projects/rvi-repo-manifest/generated/default.xml @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/projects/rvi-repo-manifest/generated/riscv-admin.xml b/projects/rvi-repo-manifest/generated/riscv-admin.xml deleted file mode 100644 index 149b266..0000000 --- a/projects/rvi-repo-manifest/generated/riscv-admin.xml +++ /dev/null @@ -1,104 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/rvi-repo-manifest/generated/riscv-android-src.xml b/projects/rvi-repo-manifest/generated/riscv-android-src.xml deleted file mode 100644 index 08be4f3..0000000 --- a/projects/rvi-repo-manifest/generated/riscv-android-src.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/rvi-repo-manifest/generated/riscv-collab.xml b/projects/rvi-repo-manifest/generated/riscv-collab.xml deleted file mode 100644 index 9941b46..0000000 --- a/projects/rvi-repo-manifest/generated/riscv-collab.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/projects/rvi-repo-manifest/generated/riscv-non-isa.xml b/projects/rvi-repo-manifest/generated/riscv-non-isa.xml deleted file mode 100644 index d49464a..0000000 --- a/projects/rvi-repo-manifest/generated/riscv-non-isa.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/rvi-repo-manifest/generated/riscv-software-src.xml b/projects/rvi-repo-manifest/generated/riscv-software-src.xml deleted file mode 100644 index fed95f5..0000000 --- a/projects/rvi-repo-manifest/generated/riscv-software-src.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/projects/rvi-repo-manifest/generated/riscv.xml b/projects/rvi-repo-manifest/generated/riscv.xml deleted file mode 100644 index 89161e9..0000000 --- a/projects/rvi-repo-manifest/generated/riscv.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/riscv-admin.xml b/riscv-admin.xml deleted file mode 120000 index 0ee9434..0000000 --- a/riscv-admin.xml +++ /dev/null @@ -1 +0,0 @@ -projects/rvi-repo-manifest/generated/riscv-admin.xml \ No newline at end of file diff --git a/riscv-android-src.xml b/riscv-android-src.xml deleted file mode 120000 index 38952cc..0000000 --- a/riscv-android-src.xml +++ /dev/null @@ -1 +0,0 @@ -projects/rvi-repo-manifest/generated/riscv-android-src.xml \ No newline at end of file diff --git a/riscv-collab.xml b/riscv-collab.xml deleted file mode 120000 index 36a8f3c..0000000 --- a/riscv-collab.xml +++ /dev/null @@ -1 +0,0 @@ -projects/rvi-repo-manifest/generated/riscv-collab.xml \ No newline at end of file diff --git a/riscv-non-isa.xml b/riscv-non-isa.xml deleted file mode 120000 index d714049..0000000 --- a/riscv-non-isa.xml +++ /dev/null @@ -1 +0,0 @@ -projects/rvi-repo-manifest/generated/riscv-non-isa.xml \ No newline at end of file diff --git a/riscv-software-src.xml b/riscv-software-src.xml deleted file mode 120000 index c52ac48..0000000 --- a/riscv-software-src.xml +++ /dev/null @@ -1 +0,0 @@ -projects/rvi-repo-manifest/generated/riscv-software-src.xml \ No newline at end of file diff --git a/riscv.xml b/riscv.xml deleted file mode 120000 index 540d305..0000000 --- a/riscv.xml +++ /dev/null @@ -1 +0,0 @@ -projects/rvi-repo-manifest/generated/riscv.xml \ No newline at end of file