From b64227d1daf38e5baf099d5cb2d78ebb0dc3c292 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Mon, 11 Jan 2021 04:22:50 +0000 Subject: [PATCH] Roll back submodule-related changes. --- blog/builder.sh | 7 ------- blog/submodule-links.rb | 19 ------------------- 2 files changed, 26 deletions(-) delete mode 100644 blog/submodule-links.rb diff --git a/blog/builder.sh b/blog/builder.sh index 6d3cf9f..6a5fe67 100644 --- a/blog/builder.sh +++ b/blog/builder.sh @@ -7,13 +7,6 @@ cp -r $src/* . # We have to manually edit the configuration. sed -i "$urlSub" config.toml -# Run the submodule command in the source .git -# repo, amending the config. -cwdir=$(pwd) -cd $src -ruby $submodules >> $cwdir/config.toml -cd $cwdir - # Build site with Hugo hugo $extraFlags diff --git a/blog/submodule-links.rb b/blog/submodule-links.rb deleted file mode 100644 index 5bc5bb8..0000000 --- a/blog/submodule-links.rb +++ /dev/null @@ -1,19 +0,0 @@ -puts "[params]" -puts " [params.submoduleLinks]" - -`git submodule status --recursive`.lines do |line| - hash, path = line[1..].split " " - next unless path.start_with? "code/" - code_path = path.delete_prefix "code/" - url = `git config --file .gitmodules --get 'submodule.#{path}.url'`.chomp.delete_suffix(".git") - safe_name = code_path.gsub(/\/|-|_/, "") - - if url =~ /dev.danilafe.com/ - file_url = "#{url}/src/commit/#{hash}" - else - raise "Submodule URL not in a known format!" - end - puts " [params.submoduleLinks.#{safe_name}]" - puts " path = #{code_path.dump}" - puts " url = #{file_url.dump}" -end