Roll back submodule-related changes.

This commit is contained in:
Danila Fedorin 2021-01-11 04:22:50 +00:00
parent a8ee845721
commit b64227d1da
2 changed files with 0 additions and 26 deletions

View File

@ -7,13 +7,6 @@ cp -r $src/* .
# We have to manually edit the configuration. # We have to manually edit the configuration.
sed -i "$urlSub" config.toml 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 # Build site with Hugo
hugo $extraFlags hugo $extraFlags

View File

@ -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