diff options
author | Cole Mickens <cole.mickens@gmail.com> | 2018-10-27 04:36:25 -0700 |
---|---|---|
committer | Cole Mickens <cole.mickens@gmail.com> | 2018-10-27 04:38:18 -0700 |
commit | 5b19cdafd3ec59e1124894275909e5ed79d4389a (patch) | |
tree | d1a844676921b5e897167771d48cc32b1456e59b | |
parent | 4ca7494e01d46ce6c437f33def6a9a5a8e1f233d (diff) |
README.md: add lastrun info
-rw-r--r-- | README.md | 2 | ||||
-rwxr-xr-x | update.sh | 12 |
2 files changed, 10 insertions, 4 deletions
@@ -20,6 +20,8 @@ This is a `nixpkgs` overlay containing `HEAD` revisions of: | redshift-wayland | [2018-09-01 12:25](https://github.com/minus7/redshift/commits/a2177ed9942477868ccc514372f32a0fbcbe189e) | <!--pkgs--> +Auto-update script last run: <!--update-->2018-10-27 04:37<!--update-->. + Please open an issue if something is out of date. ## Example Usage @@ -18,8 +18,8 @@ function update() { rev="" commitdate="" url="https://api.github.com/repos/${owner}/${repo}/commits?sha=${ref}" - #commit="$(curl --silent --fail "${url}")" - commit="$(curl -u "${GHUSER}:${GHPASS}" --silent --fail "${url}")" + commit="$(curl --silent --fail "${url}")" + #commit="$(curl -u "${GHUSER}:${GHPASS}" --silent --fail "${url}")" rev="$(echo "${commit}" | jq -r ".[0].sha")" commitdate="$(echo "${commit}" | jq -r ".[0].commit.committer.date")" sha256="$(nix-prefetch-url --unpack "https://github.com/${owner}/${repo}/archive/${rev}.tar.gz" 2>/dev/null)" @@ -72,8 +72,12 @@ rg \ --multiline '(?s)(.*)<!--pkgs-->(.*)<!--pkgs-->(.*)' \ "README.md" \ --replace "\$1${replace}\$3" \ - > README2.md -mv README2.md README.md + > README2.md; mv README2.md README.md +rg \ + --multiline '(?s)(.*)<!--update-->(.*)<!--update-->(.*)' \ + "README.md" \ + --replace "\$1<!--update-->$(date '+%Y-%m-%d %H:%M')<!--update-->\$3" \ + > README2.md; mv README2.md README.md # optimisitically upload any "builtattrs" to our cache copy="/etc/nixcfg/utils/azure/nix-copy-azure.sh" |