Skip to content

Commit

Permalink
Also pin repos themselves
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Nov 9, 2023
1 parent d648c0c commit e079780
Show file tree
Hide file tree
Showing 20 changed files with 28 additions and 25 deletions.
15 changes: 9 additions & 6 deletions populate_projects.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ for d in */; do (
d="${d%/}"
cd "$d"
printf "%s -> " "$d" >&2
if [[ ! -f 'url.txt' ]]; then
repo="https://github.com/${d//--//}"
branch="$(git remote show "$repo" | grep -oP 'HEAD branch: \K.+')"
echo "$repo/raw/$branch/mkdocs.yml" >url.txt
if [[ -f 'url.txt' ]]; then
repo=$(grep -oP 'https://github.com/\K[^/]+/[^/]+' url.txt)
path=$(grep -oP '/blob/[^/]+/\K.+' url.txt)
else
repo="${d//--//}"
path='mkdocs.yml'
fi
cat url.txt >&2
curl -s -f -L -- $(cat url.txt) | (mkdocs get-deps -f - || true) | grep . >requirements.in
commit=$(curl -sfL "https://api.github.com/repos/$repo/commits?per_page=1" | jq -r '.[0].sha')
echo "https://github.com/$repo/blob/$commit/$path" | tee /dev/stderr >url.txt
sed 's@/blob/@/raw/@' url.txt | xargs curl -sfL | (mkdocs get-deps -f - || true) | grep . >requirements.in
(cat requirements.extra 2>/dev/null || true) >>requirements.in
); done

Expand Down
2 changes: 1 addition & 1 deletion projects/Noovolari--leapp/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/Noovolari/leapp/raw/master/mkdocs.yml
https://github.com/Noovolari/leapp/blob/11b375de7231a1f15ec95e736e1f779bad3ce6a0/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/Rat-Rig--V-core-3/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/Rat-Rig/V-core-3/raw/main/mkdocs.yml
https://github.com/Rat-Rig/V-core-3/blob/4f5d91f42c9a9f7ec346c73728fa6329491aad8c/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/crystal-lang--crystal-book/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/crystal-lang/crystal-book/raw/master/mkdocs.yml
https://github.com/crystal-lang/crystal-book/blob/f324ebf79204846bfc0c0b0dd5062f4806891618/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/e-maxx-eng--e-maxx-eng/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/e-maxx-eng/e-maxx-eng/raw/master/mkdocs.yml
https://github.com/e-maxx-eng/e-maxx-eng/blob/86b132438818fdf37fcfaab3e0048663781cc392/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/emacs-lsp--lsp-mode/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/emacs-lsp/lsp-mode/raw/master/mkdocs.yml
https://github.com/emacs-lsp/lsp-mode/blob/75ea20714635e70ca3da460d1fe558f5057eb373/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/gledos--ggame/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/gledos/ggame/raw/master/mkdocs.yml
https://github.com/gledos/ggame/blob/ac3cad474b5690484e8ca6ce8a70c14d34555686/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/ikrima--gamedevguide/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ikrima/gamedevguide/raw/master/mkdocs.yml
https://github.com/ikrima/gamedevguide/blob/3dc28e90b93a435eb6f1aac7149246e3390f11a2/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/k3d-io--k3d/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/k3d-io/k3d/raw/main/mkdocs.yml
https://github.com/k3d-io/k3d/blob/f73fe36eb0674b9c4b2bc27b36c6dfc8a6151f8c/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/librenms--librenms/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/librenms/librenms/raw/master/mkdocs.yml
https://github.com/librenms/librenms/blob/63eeeb71722237d1461a37bb6da99fda25e02c91/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/mkdocs--mkdocs/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/mkdocs/mkdocs/raw/master/mkdocs.yml
https://github.com/mkdocs/mkdocs/blob/dc45916aa1cc4b4d4796dd45656bd1ff60d4ce44/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/mkdocstrings--mkdocstrings/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/mkdocstrings/mkdocstrings/raw/main/mkdocs.yml
https://github.com/mkdocstrings/mkdocstrings/blob/afc4ea4e178d27c755528f22adb7c1a6fce736f2/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/nasa-jpl--open-source-rover/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/nasa-jpl/open-source-rover/raw/master/mkdocs.yml
https://github.com/nasa-jpl/open-source-rover/blob/8f1b426f64efa581a7fc2d9f95b003a25365796a/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/ni--systemlink-operations-handbook/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ni/systemlink-operations-handbook/raw/master/mkdocs.yml
https://github.com/ni/systemlink-operations-handbook/blob/94551b22f75a8e611d013326c73849d22282fb3d/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/ntno--mkdocs-terminal/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/ntno/mkdocs-terminal/raw/main/documentation/mkdocs.yml
https://github.com/ntno/mkdocs-terminal/blob/7d88d64b4dd8175814f79b4989431353a7fe621c/documentation/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/open-amt-cloud-toolkit--docs/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/open-amt-cloud-toolkit/docs/raw/main/mkdocs.yml
https://github.com/open-amt-cloud-toolkit/docs/blob/a9ea9491300e3a9b2fa5db3710b9033bbe69abf9/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/oprypin--mkdocs-gen-files/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/oprypin/mkdocs-gen-files/raw/master/mkdocs.yml
https://github.com/oprypin/mkdocs-gen-files/blob/e5cdd6c044c079a4d8c59b73755c00ace97a2325/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/seleniumbase--SeleniumBase/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/seleniumbase/SeleniumBase/raw/master/mkdocs.yml
https://github.com/seleniumbase/SeleniumBase/blob/62e7a043636f4fbe5804fb8f4684eeb6224a51f2/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/spaceship-prompt--spaceship-prompt/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/spaceship-prompt/spaceship-prompt/raw/master/mkdocs.yml
https://github.com/spaceship-prompt/spaceship-prompt/blob/be826cbe2bb11a0675dd71f548ff1396608da7ea/mkdocs.yml
2 changes: 1 addition & 1 deletion projects/tfeldmann--organize/url.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
https://github.com/tfeldmann/organize/raw/main/mkdocs.yml
https://github.com/tfeldmann/organize/blob/0d254e984e555094b0958d2f8733b91ebc5fe641/mkdocs.yml

0 comments on commit e079780

Please sign in to comment.