Skip to content

Commit

Permalink
chore: update to 0.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
squattingmonk committed Mar 3, 2024
1 parent 641a5fb commit d04efa4
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 10 deletions.
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# nasher changelog

## 0.22.0: March 3, 2024

### Allow automatically overwriting files

Added two new flags, `--overwritePackedFile` and `--overwriteInstalledFile`,
which can be used to automatically answer the "Are you sure you wish to
overwrite?" prompt when an existing packed or installed file of the same name is
found. Valid values include "ask", "default", "always", and "never". Like other
nasher flags, these can be set with `nasher config` so you don't have to pass
them every time.

### Automatically handle multiple source files during unpack

The unpack operation now supports the `--onMultipleSources` flag just like the
pack operation. The options are:
- `choose`: manually choose the file to update (this is the default)
- `default`: automatically accept the first file found
- `error`: fail if multiple source files are found

### Bug fixes

- `--abortOnCompileError` no longer answers other prompts
- `--packUnchanged` no longer consumes other args.
- `--{yes,no,default}` no longer override `--onMultipleSources`.

---

Details: https://github.com/squattingmonk/nasher/compare/0.21.0...0.22.0


## 0.21.0: September 2, 2023

- The `compile` command now returns a non-zero exit code on failure. When
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN dpkg --add-architecture i386 \
&& apt upgrade -y \
&& apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 -y \
&& rm -fr /var/lib/apt/lists/* /root/.cache/* /usr/share/doc/* /var/cache/man/*
ARG NASHER_VERSION="0.21.0"
ARG NASHER_VERSION="0.22.0"
ARG NASHER_USER_ID=1000
RUN adduser nasher --disabled-password --gecos "" --uid ${NASHER_USER_ID}
RUN echo "nasher ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && usermod -aG sudo nasher
Expand Down
29 changes: 21 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ version control and team collaboration.
* nasher uses json or [NWNT](https://github.com/WilliamDraco/NWNT) for its text
file format.

This guide is current as of nasher release 0.21.x.
This guide is current as of nasher release 0.22.x.

* [Installation Options](#installation-options)
* [Binary Releases](#binary-releases)
Expand Down Expand Up @@ -64,7 +64,7 @@ of nasher for your OS and place a pointer to the location of the executable
file in your [`PATH` environment variable](https://superuser.com/a/284351).

In addition, you will need the following tools:
* [neverwinter.nim](https://github.com/niv/neverwinter.nim/releases) >= 1.6.4
* [neverwinter.nim](https://github.com/niv/neverwinter.nim/releases) >= 1.7.3
* [nwnt](https://github.com/WilliamDraco/NWNT) >= 1.3.3
* [nwnsc](https://github.com/nwneetools/nwnsc/releases) >= 1.1.3
* [git](https://git-scm.com/downloads)
Expand Down Expand Up @@ -720,10 +720,6 @@ by passing the key/value pair as an option to the command.
- default: `choose`
- supported: `choose` (choose manually), `default` (accept the first choice),
`error` (abort with an error message)
- note: this option currently only applies for the `convert`, `compile`,
`pack`, `install`, `play`, `test`, and `serve` commands. The `unpack`
command still makes you choose where to unpack a file if multiple options
are found.
- `abortOnCompileError`: whether to automatically abort packing, installing, or
testing a target if `nwnsc` encounters errors.
- default: `false`
Expand All @@ -732,6 +728,20 @@ by passing the key/value pair as an option to the command.
changed since the last pack.
- default: `false`
- supported: `true`, `false`
- `overwritePackedFile`: automatically answer the "Are you sure you wish to
overwrite?" prompt when an existing file of the same name is found within
the project dir (`pack` command only):
- default: `ask`
- supported: `ask` (always ask), `default` (overwrite only if the existing
file is older than the newest source file), `always` (always overwrite),
`never` (never overwrite)
- `overwriteInstalledFile`: automatically answer the "Are you sure you wish to
overwrite?" prompt when an existing file of the same name is found within
`installDir` (`install` command only):
- default: `ask`
- supported: `ask` (always ask), `default` (overwrite only if the existing
file is older than the newest source file), `always` (always overwrite),
`never` (never overwrite)

#### Examples

Expand Down Expand Up @@ -963,7 +973,7 @@ $ nasher compile demo --file:myfile.nss
If not supplied, `<target>` will default to the first target defined in the
package's [`nasher.cfg`](#nashercfg). The dummy target `all` runs the command
on all defined targets in a loop. You can also specify multiple targets by
separatng them with spaces.
separating them with spaces.

If the packed file would overwrite an existing file, you will be prompted to
overwrite the file. The newly packaged file will have a modification time equal
Expand All @@ -986,6 +996,7 @@ run it separately unless you want to pack files without installing.
| `--modDescription:<desc>` | sets the `Mod_Description` value in `module.ifo` to `<desc>` |
| `--abortOnCompileError` | abort packing if errors encountered during compilation |
| `--packUnchanged` | continue packing a file if there are no changed files included |
| `--overwritePackedFile` | how to handle an existing packed file in the project dir |

#### Examples

Expand All @@ -1011,7 +1022,7 @@ $ nasher pack module --file:"modules/mymodule.mod" --modName:"My Module" --modMi
If not supplied, `<target>` will default to the first target defined in the
package's [`nasher.cfg`](#nashercfg). The dummy target `all` runs the command
on all defined targets in a loop. You can also specify multiple targets by
separatng them with spaces.
separating them with spaces.

If the file to be installed would overwrite an existing file, you will be
prompted to overwrite it. The default answer is to keep the newer file. If the
Expand All @@ -1034,6 +1045,8 @@ the module (`.mod`) file.
| `--modDescription:<desc>` | sets the `Mod_Description` value in `module.ifo` to `<desc>` |
| `--abortOnCompileError` | abort installation if errors encountered during compilation |
| `--packUnchanged` | continue packing a file if there are no changed files included |
| `--overwritePackedFile` | how to handle an existing packed file in the project dir |
| `--overwriteInstalledFile` | how to handle an existing installed file in `installDir` |

#### Examples
```console
Expand Down
2 changes: 1 addition & 1 deletion nasher.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.21.0"
version = "0.22.0"
author = "Michael A. Sinclair"
description = "A build tool for Neverwinter Nights projects"
license = "MIT"
Expand Down

0 comments on commit d04efa4

Please sign in to comment.