diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2020-09-19 16:44:17 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2020-09-20 20:11:46 +0200 |
commit | 4a161ddb3bdfab0b09597456bd541cbbe6c84b07 (patch) | |
tree | 79c5beedaeceb87910316b55f76910396800b0ab /doc | |
parent | 01b9d5371c5ce1f8d622ff00bd67c9defb656c79 (diff) |
maintainers/scripts/update.nix: support auto-committing by passing attrPath
Instead of having the updateScript support returning JSON object,
it should be sufficient to specify attrPath in passthru.updateScript.
It is much easier to use.
The former is now considered experimental.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/stdenv/stdenv.xml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/doc/stdenv/stdenv.xml b/doc/stdenv/stdenv.xml index ccf5bb440d36..060dc80c9157 100644 --- a/doc/stdenv/stdenv.xml +++ b/doc/stdenv/stdenv.xml @@ -475,11 +475,12 @@ passthru.updateScript = writeScript "update-zoom-us" '' <programlisting> passthru.updateScript = [ ../../update.sh pname "--requested-release=unstable" ]; </programlisting> - Finally, the attribute can be an attribute set, listing the extra supported features among other things. + Finally, the attribute can be an attribute set, listing the attribute path and extra supported features in addition to command. <programlisting> passthru.updateScript = { command = [ ../../update.sh pname ]; - supportedFeatures = [ "commit" ]; + attrPath = pname; + supportedFeatures = [ … ]; }; </programlisting> <note> @@ -488,9 +489,12 @@ passthru.updateScript = { </para> </note> </para> + <para> + <filename>maintainers/scripts/update.nix</filename> also supports automatically creating commits by running it with <literal>--argstr commit true</literal> but it requires either declaring the <variable>attrPath</variable>, or adding a <literal>commit</literal> to <variable>supportedFeatures</variable> and <link xlink:href="#var-passthru-updateScript-commit">modifying the script accordingly</link>. + </para> <variablelist> <title>Supported features</title> - <varlistentry> + <varlistentry xml:id="var-passthru-updateScript-commit"> <term> <varname>commit</varname> </term> |