Compare commits
6 Commits
7aeb03f813
...
b64227d1da
Author | SHA1 | Date | |
---|---|---|---|
b64227d1da | |||
a8ee845721 | |||
6f060b01bc | |||
1b5b09dbe1 | |||
77059e3938 | |||
bfdc36dd4a |
@ -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
|
||||
|
||||
|
@ -9,6 +9,7 @@ let
|
||||
src = fetchgit {
|
||||
inherit url;
|
||||
inherit (settings) rev sha256;
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
urlSub =
|
||||
let
|
||||
@ -28,8 +29,8 @@ let
|
||||
(ruby.withPackages (ps: [ ps.nokogiri ]))
|
||||
];
|
||||
};
|
||||
rev = "60eb50737d535e8ec506b877250d0e4bbfbf1bda";
|
||||
sha256 = "1xyppzim3kvawr1bkizwmkbgvb4pxhgnc7gxwjv8sdfcyvbfgz8p";
|
||||
rev = "b3ff2fe135fd57a646d5d3271db64886d745ff8c";
|
||||
sha256 = "1nljx2wsc25fciwc5ixmwvf8sx4v9n9brx37dhlr4knsadcp89jy";
|
||||
localizationRev = "0b5748cc5a19b5d1d78bfcfa58d4027cc10524dd";
|
||||
localizationSha256 = "12pqh534z3ppvgzy0a77s9j1qzzmiyxwvlmh5y76pccf32wvi9wz";
|
||||
in
|
||||
|
@ -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
|
@ -1 +1 @@
|
||||
nix-prefetch-git --rev refs/heads/master https://dev.danilafe.com/Web-Projects/blog-static.git --quiet | jq '.rev,.sha256' | xargs ./change_blog_nix.sh
|
||||
nix-prefetch-git --rev refs/heads/master https://dev.danilafe.com/Web-Projects/blog-static.git --quiet --fetch-submodules | jq '.rev,.sha256' | xargs ./change_blog_nix.sh
|
||||
|
Reference in New Issue
Block a user