Skip to content

Commit

Permalink
0.3.0: add upgrade command; closes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Dec 15, 2019
1 parent 161e0b5 commit 62b9f8a
Show file tree
Hide file tree
Showing 21 changed files with 422 additions and 69 deletions.
46 changes: 46 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ output (and optional repair) of the environment it finds itself in.
- [Finding a Path via Nim Import Name](https://github.com/disruptek/nimph#path)
- [Locking the Dependency Tree by Name](https://github.com/disruptek/nimph#lock)
- [Rolling the Dependency Tree by Name](https://github.com/disruptek/nimph#unlock)
- [Upgrading Dependencies Automatically](https://github.com/disruptek/nimph#upgrade)
- [Cutting New Release Versions+Tags](https://github.com/disruptek/nimph#bump)
- [Adding Any Missing Tags Automatically](https://github.com/disruptek/nimph#tag)
- [Running Commands on All Dependencies](https://github.com/disruptek/nimph#run)
Expand Down Expand Up @@ -222,6 +223,51 @@ unsafe lock of `regex` for regex>=0.10.0 as #ff6ab8297c72f30e4da34daa9e8a60075ce
rolled to #e3243f6ff2d05290f9c6f1e3d3f1c725091d60ab to meet git://github.com/disruptek/cutelog.git##1.1.1
```

### Upgrade

The `upgrade` subcommand resolves the project's dependencies and attempts to
upgrade any git clones to the latest release tag that matches the project's
requirements.

The `outdated` subcommand is an alias equivalent to `upgrade --dry-run`:

```
$ nimph outdated
would upgrade swayipc from 3.1.0 to 3.1.3
would upgrade foreach from 1.0.0 to 1.0.2
would upgrade cutelog from 1.0.1 to 1.1.1
would upgrade bump from 1.8.11 to 1.8.16
would upgrade github from 1.0.1 to 1.0.2
would upgrade nimph from 0.1.0 to 0.2.1
would upgrade regex from 0.10.0 to v0.13.0
would upgrade unicodedb from 0.6.0 to v0.7.2
bot is not fully up-to-date
```

Upgrade individual packages by specifying the _import name_.

```
$ nimph upgrade swayipc
rolled swayipc from 3.1.0 to 3.1.3
the latest swayipc release of 3.1.4 is masked
👌bot is up-to-date
```

Upgrade all dependencies at once by omitting any module names.

```
$ nimph upgrade
the latest swayipc release of 3.1.4 is masked
rolled foreach from 1.0.0 to 1.0.2
rolled cutelog from 1.0.1 to 1.1.1
rolled bump from 1.8.11 to 1.8.16
rolled github from 1.0.1 to 1.0.2
rolled nimph from 0.1.0 to 0.2.1
rolled regex from 0.10.0 to v0.13.0
rolled unicodedb from 0.6.0 to v0.7.2
👌bot is up-to-date
```

### Bump

The `bump` tool is included as a dependency; it provides easy version and tag incrementing.
Expand Down
17 changes: 15 additions & 2 deletions docs/nimph.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ <h1 class="title">nimph</h1>
title="pather(names: seq[string]; log_level = logLevel; dry_run = false): int"><wbr />pather<span class="attachedType"></span></a></li>
<li><a class="reference" href="#runner%2Cseq%5BT%5D%5Bstring%5D"
title="runner(args: seq[string]; log_level = logLevel; dry_run = false): int"><wbr />runner<span class="attachedType"></span></a></li>
<li><a class="reference" href="#upgrader%2Cseq%5BT%5D%5Bstring%5D"
title="upgrader(names: seq[string]; log_level = logLevel; dry_run = false): int"><wbr />upgrader<span class="attachedType"></span></a></li>
<li><a class="reference" href="#lockfiler%2Cseq%5BT%5D%5Bstring%5D"
title="lockfiler(names: seq[string]; log_level = logLevel; dry_run = false): int"><wbr />lockfiler<span class="attachedType"></span></a></li>
<li><a class="reference" href="#unlockfiler%2Cseq%5BT%5D%5Bstring%5D"
Expand All @@ -140,7 +142,7 @@ <h1 class="title">nimph</h1>
<div class="section" id="6">
<h1><a class="toc-backref" href="#6">Imports</a></h1>
<dl class="item">
<a class="reference external" href="nimph/spec.html">nimph/spec</a>, <a class="reference external" href="nimph/nimble.html">nimph/nimble</a>, <a class="reference external" href="nimph/project.html">nimph/project</a>, <a class="reference external" href="nimph/doctor.html">nimph/doctor</a>, <a class="reference external" href="nimph/thehub.html">nimph/thehub</a>, <a class="reference external" href="nimph/config.html">nimph/config</a>, <a class="reference external" href="nimph/package.html">nimph/package</a>, <a class="reference external" href="nimph/dependency.html">nimph/dependency</a>, <a class="reference external" href="nimph/locker.html">nimph/locker</a>, <a class="reference external" href="nimph/group.html">nimph/group</a>
<a class="reference external" href="nimph/spec.html">nimph/spec</a>, <a class="reference external" href="nimph/nimble.html">nimph/nimble</a>, <a class="reference external" href="nimph/project.html">nimph/project</a>, <a class="reference external" href="nimph/doctor.html">nimph/doctor</a>, <a class="reference external" href="nimph/thehub.html">nimph/thehub</a>, <a class="reference external" href="nimph/config.html">nimph/config</a>, <a class="reference external" href="nimph/package.html">nimph/package</a>, <a class="reference external" href="nimph/dependency.html">nimph/dependency</a>, <a class="reference external" href="nimph/locker.html">nimph/locker</a>, <a class="reference external" href="nimph/group.html">nimph/group</a>, <a class="reference external" href="nimph/version.html">nimph/version</a>
</dl></div>
<div class="section" id="12">
<h1><a class="toc-backref" href="#12">Procs</a></h1>
Expand Down Expand Up @@ -198,6 +200,17 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>

this is another pather, basically, that invokes the arguments in the path

</dd>
<a id="upgrader,seq[T][string]"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#upgrader%2Cseq%5BT%5D%5Bstring%5D"><span class="Identifier">upgrader</span></a><span class="Other">(</span><span class="Identifier">names</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">log_level</span> <span class="Other">=</span> <span class="Identifier">logLevel</span><span class="Other">;</span> <span class="Identifier">dry_run</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span>
<span class="Identifier">ValueError</span><span class="Other">,</span> <span class="Identifier">UnpackError</span><span class="Other">,</span> <span class="Identifier">OSError</span><span class="Other">,</span> <span class="Identifier">IOError</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">,</span> <span class="Identifier">KeyError</span><span class="Other">,</span> <span class="Identifier">ERecoverableError</span><span class="Other">,</span>
<span class="Identifier">EOFError</span><span class="Other">,</span> <span class="Identifier">Defect</span><span class="Other">,</span> <span class="Identifier">NPegException</span><span class="Other">,</span> <span class="Identifier">Exception</span><span class="Other">]</span><span class="Other">,</span> <span class="Identifier">tags</span><span class="Other">:</span> <span class="Other">[</span><span class="Identifier">ReadDirEffect</span><span class="Other">,</span> <span class="Identifier">ReadEnvEffect</span><span class="Other">,</span>
<span class="Identifier">ReadIOEffect</span><span class="Other">,</span> <span class="Identifier">RootEffect</span><span class="Other">,</span> <span class="Identifier">WriteIOEffect</span><span class="Other">,</span> <span class="Identifier">WriteEnvEffect</span><span class="Other">,</span> <span class="Identifier">WriteDirEffect</span><span class="Other">,</span>
<span class="Identifier">ExecIOEffect</span><span class="Other">]</span></span><span class="Other">.}</span></span></pre></dt>
<dd>

perform upgrades of dependencies within project requirement specifications

</dd>
<a id="lockfiler,seq[T][string]"></a>
<dt><pre><span class="Keyword">proc</span> <a href="#lockfiler%2Cseq%5BT%5D%5Bstring%5D"><span class="Identifier">lockfiler</span></a><span class="Other">(</span><span class="Identifier">names</span><span class="Other">:</span> <span class="Identifier">seq</span><span class="Other">[</span><span class="Identifier">string</span><span class="Other">]</span><span class="Other">;</span> <span class="Identifier">log_level</span> <span class="Other">=</span> <span class="Identifier">logLevel</span><span class="Other">;</span> <span class="Identifier">dry_run</span> <span class="Other">=</span> <span class="Identifier">false</span><span class="Other">)</span><span class="Other">:</span> <span class="Identifier">int</span> <span><span class="Other">{</span><span class="Other pragmadots">...</span><span class="Other">}</span></span><span class="pragmawrap"><span class="Other">{.</span><span class="pragma"><span class="Identifier">raises</span><span class="Other">:</span> <span class="Other">[</span>
Expand Down Expand Up @@ -264,7 +277,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2019-12-14 20:22:17 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2019-12-15 01:10:25 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/nimph/asjson.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ <h1><a class="toc-backref" href="#12">Procs</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2019-12-14 20:22:17 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2019-12-15 01:10:25 UTC</small>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/nimph/config.html
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ <h1><a class="toc-backref" href="#18">Templates</a></h1>
<div class="twelve-columns footer">
<span class="nim-sprite"></span>
<br/>
<small style="color: var(--hint);">Made with Nim. Generated: 2019-12-14 20:22:15 UTC</small>
<small style="color: var(--hint);">Made with Nim. Generated: 2019-12-15 01:10:23 UTC</small>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit 62b9f8a

Please sign in to comment.