File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
pkgs/build-support/fetchpijul Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 66channel=" main"
77change=
88state=
9+ date=
910exp_hash=
1011
1112usage () {
@@ -100,11 +101,15 @@ if [ -z "$final_path" ]; then
100101
101102 cd " $tmp_clone "
102103 pijul clone $clone_args " $remote " " $name "
104+ latest_log=" $( pijul log --repository " $tmp_clone /$name " --limit 1) "
103105 # State is a stable reference is a stable reference for the patchset that
104106 # doesn't depend on patch order. As a result, it will always be included.
105107 if [ -z " $state " ]; then
106- state=" $( pijul log --repository " $tmp_clone / $name " --state --limit 1 | awk ' /^State:/ {printf $2}' ) "
108+ state=" $( printf " %s " " $latest_log " | awk ' /^State:/ {printf $2}' ) "
107109 fi
110+ date=" $( printf " %s" " $latest_log " | awk ' /^Date:/ { sub(/^Date:[[:space:]]*/, "", $0); printf $0 }' ) "
111+ date=" $( date -u -d " $date " " +%Y-%m-%dT%H:%M:%SZ" ) "
112+
108113 rm -rf " $tmp_clone /$name /.pijul"
109114
110115 hash=" $( nix-hash --type " $hash_algo " " $hash_format " " $tmp_clone /$name " ) "
@@ -132,6 +137,7 @@ if [ -n "$change" ]; then cat <<EOF
132137EOF
133138fi ; cat << EOF
134139 "state": $( json_escape " $state " ) ,
140+ "date": $( json_escape " $date " ) ,
135141 "path": "$final_path ",
136142 $( json_escape " $hash_algo " ) : $( json_escape " $hash " ) ,
137143 "hash": "$( nix-hash --to-sri --type " $hash_algo " " $hash " ) "
You can’t perform that action at this time.
0 commit comments