Skip to content

Releases: TheOnlyMrCat/runscript

Runscript 1.0 Beta 7

27 Jun 07:11
Compare
Choose a tag to compare

I finished a new system for spawning commands, so output has been completely revamped.

Changes since last beta:

  • Command spawning now happens more simultaneously than ever! Executing a pipeline will no longer have an opportunity to mess with the output of run. (Unless a command in the pipeline sets the tty to raw mode)...
  • Additionally, run now more closely matches the behaviour of POSIX shells when running pipelines, by giving each intermediate entry its own subshell to execute in, except for the last entry which gets the main context.
  • $* now works exactly the same as $@ while I figure out what it's actually supposed to do
  • Output has been completely overhauled! Notable changes include:
    • Expanded glob patterns don't expand fully, and instead just display the number of matches
    • Strings are highlighted in yellow.
    • Redirects and env remaps are displayed inline, rather than separately.
    • List output shows which file is being listed, and highlights the default target in yellow.
  • Runscript now reads and considers targets from all eligible runscripts in the current directory. Targets in an earlier script shadow those in a later script. In practice, this means you can have a private .run file alongside the project's main run file.

Runscript 1.0 Beta 6

09 Jun 01:17
Compare
Choose a tag to compare

A few important features, a few fixes.

Changes since last beta:

  • Support for external shells! Declaring a target in this manner: [target:phase] /path/to/sh will execute /path/to/sh <temp_file> <positional args> when you run that phase. An external shell can be chosen for all targets with the ::default-shell /path/to/sh file-wide option.
  • Shell-style functions are now supported. While not necessarily directly useful in scripts, this allows more shell scripts to be sourced successfully.
  • The CLI has received special attention and should be more robust
  • if statements are now implemented properly.
  • $* parameters have been implemented, which evaluates positional parameters as shell words
  • The old-parser will not crash on you if you're using that feature

Runscript 1.0 Beta 5

17 Apr 22:04
Compare
Choose a tag to compare

Small usability updates

Changes since last beta:

  • Errors now get printed in a more consistent format
  • Errors when executing commands (command doesn't exist, etc) now get printed in a normal way instead of causing a panic

Runscript 1.0 Beta 4

26 Mar 20:00
Compare
Choose a tag to compare

I have stopped calling it 2.0.

Changes since last beta:

  • New -s option lets you run shell scripts with the runscript shell.
  • Old parser now behind a feature flag, and automatically applies when you run an old script
  • New options: ::default-script and ::default-phase, which allow you to manually specify the defaults.
  • ::default-phase lets you run multiple phases as the default (e.g. build and run)
  • Lots of general code cleanup

Runscript 2.0 Beta 3

10 Mar 09:32
Compare
Choose a tag to compare

I want to stop calling this 2.0, really. It makes it seem like a 3.0 could be coming at some point.

Changes and fixes since last release:

  • You can now source basic shell script files.
  • When recursively running, the default target is the one currently being executed, instead of the runscript's own default.
  • Now exits early when a command fails (did it not do that before?)
  • #3 No longer panics when running an empty target. (There's still plenty of potential panics in the code, though. Don't you worry)
  • General printing and formatting improvements

Runscript 2.0 Beta 2

22 Feb 03:57
Compare
Choose a tag to compare

And this is why I started calling these betas now. I want to use it, and using it has let me more easily catch how I want it to feel.

Changes and fixes since 2.0-beta.1

  • Phase flags -b -r -t now actually work; I forgot to link them up before.
  • The default target is now the first target in the file (perhaps syntax could be introduced later to override this), instead of [:run] being an implied header at the start of the file.
  • You can now pass -1 or --old-format to get a best-effort parsing of the runscript 1.3.0 format. In particular, includes and global/pre-global scripts are unsupported; the old phase system is coerced into the new one (b!, b => "build"; br, r, r! => "run"); and commands are parsed with conch_parser in the same way as the new format.
  • The -1 flag and the current file being executed are preserved through the recursion boundary (at least, on unix systems)

Runscript 2.0 Beta 1

21 Feb 08:19
Compare
Choose a tag to compare

I'm not calling this a pre-release, simply because I want this to be the de facto version. Yes it's a beta, because I still haven't put everything I want into it yet, but it's usable and probably won't break too much between versions.

Changelog since v1.3.0:

  • Complete rewrite of the script format, now uses TOML-like headers to denote scripts. Importantly, comments are consistently # now.
  • Expanded shell language accepted; revamped executor which supports piping properly (thankfully).
  • Changed the target/phase selection string to not include files. A specific file can be chosen with -f, otherwise it's target:phase
  • Smaller number of built-in phases: only build, run, and test. However, phases can now be any [0-9A-Za-z_]+ string.
  • What used to be default_positionals now no longer exists; just put a -- or : down instead.
  • Variables are separated between shell variables and exported variables.
  • A config file where you can change the default names of files run tries to execute, and the colours it uses for output.

Still to come:

  • sourceing other shell scripts, for example, .env files.
  • More configuration options, for example, to add special treatment for certain phases
  • More syntax, such as for metadata on certain phases, commands that only run on a particular platform, prerequisite phases...

Runscript 2.0.0 Alpha 2

02 Aug 06:56
Compare
Choose a tag to compare
Pre-release

Back to feature parity with original runscript, except globals and pre-globals were removed.

Runscript 2.0.0 Alpha 1

27 Jul 23:09
Compare
Choose a tag to compare
Pre-release
  • Redefine the syntax of runfiles
  • Allow all (most) features of shell scripts in runscripts

Runscript 1.3.0

04 Mar 00:29
Compare
Choose a tag to compare

Full changelog of this version:

  • #2 The parser is rewritten without lalrpop, since a full LR(1) parser is overkill.
  • Added environment variables overrides with a sh-like syntax: MY_VAR=value. This exports the environment variable to processes next called in the script.
  • Added the -l flag to list all the scripts in a runscript
  • Made commands with interpolated arguments show the evaluation before executing the command
  • Updated the help message
  • Added the default_positionals option (and option syntax)
  • Added the $@ syntax to expand to all positional arguments
  • Added target selection syntax to select a specific phase on a target, for example: ::r will execute the 'run' phase on the default target
  • Added pre-globals: global targets which execute before the selected target
  • Added an easter egg which can be enabled by an environment variable

Due to a linker error, no windows build is provided.