oh-my-zsh: Fix update script

Pull commit date rather than author date to avoid going back in time
on commits that have been sitting for a while.
This commit is contained in:
Tim Steinbach 2020-11-10 09:21:34 -05:00
parent 589bf72e97
commit 2e00fff047
No known key found for this signature in database
GPG key ID: 6538CB9266B06F31

View file

@ -92,7 +92,7 @@ stdenv.mkDerivation rec {
if [ ! "null" = "$latestSha" ]; then
nixpkgs="$(git rev-parse --show-toplevel)"
default_nix="$nixpkgs/pkgs/shells/zsh/oh-my-zsh/default.nix"
latestDate="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits/$latestSha | jq '.commit.author.date' | sed 's|"\(.*\)T.*|\1|g')"
latestDate="$(curl -L -s https://api.github.com/repos/ohmyzsh/ohmyzsh/commits/$latestSha | jq '.commit.committer.date' | sed 's|"\(.*\)T.*|\1|g')"
update-source-version oh-my-zsh "$latestSha" --version-key=rev
update-source-version oh-my-zsh "$latestDate" --ignore-same-hash
nixfmt "$default_nix"