Skip to content

ant update ​

sh
ant update              # every entry of the project file
ant update <name>...    # the entries named

ant update raises entries of the project file, ant.json, to the highest release of their lines. It reads the tags of each repository, writes the new versions to ant.json, selects again, fetches what the store lacks, and writes ant.lock.

sh
$ ant update
ant: fetching example.com/slug 1.4.0
- example.com/slug 1.2.0
+ example.com/slug 1.4.0
  • It stays in the line. An entry at 1.2.0 goes to the highest 1.x release, never to 2.0.0. To move an entry to another line, run ant add with the version, as ant add example.com/slug@2.0.0.
  • It never lowers a version. An entry that is at the highest release stays as it is, and ant update then prints nothing.
  • Releases come first. A prerelease, such as 1.5.0-rc.1, is taken only when the line has no release.
  • Only your own entries move. A package that another package asks for stays at the version that is asked for. To raise it, add it to your own dependencies.
  • It changes all or nothing, as ant add does.

A new release reaches a project only when you ask for it, with ant update or ant add: no run takes a version that no ant.json names.

Exit status ​

Exit statusWhen
0the files were written, or nothing had a higher release
1a name is not a dependency, a repository cannot be reached, or there is no project file
2the usage is wrong: an unknown flag, or an argument that is not a name

See also ​

Packages, ant add, ant remove, ant lock