all repos — min @ cee53a9dbe5fc3dee350ec4e26814375e892a790

A small but practical concatenative programming language.

Re-releasing using ConVer.
h3rald h3rald@h3rald.com
Thu, 18 Jun 2026 11:07:54 +0200
commit

cee53a9dbe5fc3dee350ec4e26814375e892a790

parent

88d3e899ee4ec8ea4be902017fc9358af749b38f

A .conver/history.txt

@@ -0,0 +1,1 @@

+2026-06-18: +5600 # Re-released using ConVer
A .conver/legacy.txt

@@ -0,0 +1,1 @@

+0.48.0
A .conver/release.txt

@@ -0,0 +1,1 @@

+5600
A .conver/semver.txt

@@ -0,0 +1,1 @@

+0.48.1
D .github/workflows/add-artifacts-to-current-release.yml

@@ -1,135 +0,0 @@

-name: Add artifacts to current release - -# Controls when the action will run. -on: - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - release: - name: "Build and upload artifacts" - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - - macos-15-intel - - windows-2022 - - env: - CHOOSENIM_CHOOSE_VERSION: stable - CHOOSENIM_NO_ANALYTICS: 1 - - steps: - # Cancel other actions of the same type that might be already running - - name: "Cancel similar actions in progress" - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - # Detects OS and provide Nim-friendly OS identifiers - - name: Detect current OS - id: os - run: echo "os=${{matrix.os == 'ubuntu-latest' && 'linux' || matrix.os == 'macos-13' && 'macosx' || matrix.os == 'windows-2019' && 'windows'}}" >> $GITHUB_OUTPUT - - # Checks out the repository - - uses: actions/checkout@v2 - - # Sets path (Linux, macOS) - - name: Update $PATH - run: echo "$HOME/.nimble/bin" >> $GITHUB_PATH - if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-latest' - - # Sets path (Windows) - - name: Update %PATH% - run: echo "${HOME}/.nimble/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - if: matrix.os == 'windows-2019' - - # Installs libraries - - name: install musl-gcc - run: sudo apt-get install -y musl-tools - if: matrix.os == 'ubuntu-latest' - - - name: Setup Msys2 - if: matrix.os == 'windows-2019' - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - release: true - update: true - path-type: inherit - install: >- - base-devel - autotools - mingw-w64-x86_64-perl-locale-maketext - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-autotools - - # Install the Nim - - name: Install Nim - uses: iffy/install-nim@v4.5.0 - - # Build for Linux - - name: Build (Linux) - run: nimble build -v -y -d:release --gcc.exe:musl-gcc --mm:orc --gcc.linkerexe:musl-gcc -d:ssl --opt:size min - if: matrix.os == 'ubuntu-latest' - - # Build for macOS - - name: Build (macOS) - run: nimble build -v -y -d:release -d:ssl --opt:size --mm:orc min - if: matrix.os == 'macos-13' - - # Build for Windows - - name: Build (Windows) - shell: msys2 {0} - run: nimble build -v -y -d:release --mm:orc --opt:size -d:ssl --gcc.exe:x86_64-w64-mingw32-gcc --gcc.linkerexe:x86_64-w64-mingw32-gcc min - if: matrix.os == 'windows-2019' - - # UPX compress (Linux) - - name: UPX - uses: svenstaro/upx-action@v2 - with: - files: | - min - args: --best --force - if: matrix.os == 'ubuntu-latest' - - # UPX compress (Windows) - - name: UPX - uses: svenstaro/upx-action@v2 - with: - files: | - min.exe - args: --best --force - if: matrix.os == 'windows-2019' - - # Retrieve ID and Name of the current (draft) release - - name: "Get current release" - id: current-release - uses: InsonusK/get-latest-release@v1.0.1 - with: - myToken: ${{ github.token }} - exclude_types: "release" - view_top: 1 - - # Package the resulting Linux/macOS binary - - name: Create artifact (Linux, macOS) - run: zip min_${{steps.current-release.outputs.tag_name}}_${{steps.os.outputs.os}}_x64.zip min - if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-13' - - # Package the resulting Windows binary - - name: Create artifact (Windows) - run: Compress-Archive -Path min.exe -DestinationPath min_${{steps.current-release.outputs.tag_name}}_windows_x64.zip - if: matrix.os == 'windows-2019' - - # Upload artifacts to current draft release - - name: "Upload to current release" - uses: xresloader/upload-to-github-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - file: "min_v*.zip" - overwrite: true - tag_name: ${{steps.current-release.outputs.tag_name}} - release_id: ${{steps.current-release.outputs.id }} - verbose: true
D .github/workflows/ci.yml

@@ -1,51 +0,0 @@

-name: CI - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the master branch - push: - branches: [ master ] - pull_request: - branches: [ master ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "ci" - ci: - # The type of runner that the job will run on - runs-on: ubuntu-latest - env: - CHOOSENIM_CHOOSE_VERSION: stable - CHOOSENIM_NO_ANALYTICS: 1 - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - - name: install musl-gcc - run: sudo apt-get install -y musl-tools - - - name: Update $PATH - run: echo "$HOME/.nimble/bin" >> $GITHUB_PATH - - - name: Install Nim - run: | - curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh - sh init.sh -y - - - name: Build - run: nimble build -y -d:release -d:ssl -d:static -d:useOpenSsl3 --opt:size --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc --cpu:amd64 --os:linux - - - name: UPX - uses: svenstaro/upx-action@v2 - with: - files: | - min - args: --best --force - - - name: Test - run: cd tests && ../min install && ../min all.min
D .github/workflows/test.yml

@@ -1,128 +0,0 @@

-name: Run automated tests - -# Controls when the action will run. -on: - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - release: - name: "Run all tests" - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - - macos-13 - - windows-latest - - env: - CHOOSENIM_CHOOSE_VERSION: stable - CHOOSENIM_NO_ANALYTICS: 1 - - steps: - # Cancel other actions of the same type that might be already running - - name: "Cancel similar actions in progress" - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - # Detects OS and provide Nim-friendly OS identifiers - - name: Detect current OS - id: os - run: echo "os=${{matrix.os == 'ubuntu-latest' && 'linux' || matrix.os == 'macos-13' && 'macosx' || matrix.os == 'windows-latest' && 'windows'}}" >> $GITHUB_OUTPUT - - # Checks out the repository - - uses: actions/checkout@v2 - - # Installs libraries - - name: install musl-gcc - run: sudo apt-get install -y musl-tools - if: matrix.os == 'ubuntu-latest' - - # Sets path (Linux, macOS) - - name: Update $PATH - run: echo "$HOME/.nimble/bin" >> $GITHUB_PATH - if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-latest' - - # Sets path (Windows) - - name: Update %PATH% - run: echo "${HOME}/.nimble/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - if: matrix.os == 'windows-latest' - - - name: Setup Msys2 - if: matrix.os == 'windows-latest' - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - release: true - update: true - path-type: inherit - install: >- - base-devel - autotools - mingw-w64-x86_64-perl-locale-maketext - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-autotools - - # Install the Nim compiler and dependencies - - name: Install Nim and deps - run: | - curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh - sh init.sh -y - - # Build for Linux - - name: Build (Linux) - run: nimble build -y -d:release --gcc.exe:musl-gcc --gcc.linkerexe:musl-gcc -d:ssl -d:useOpenSsl3 --opt:size - if: matrix.os == 'ubuntu-latest' - - # Build for Windows - - name: Build (Windows) - shell: msys2 {0} - run: nimble build -v -y -d:release --mm:refc --opt:size -d:ssl --gcc.exe:x86_64-w64-mingw32-gcc --gcc.linkerexe:x86_64-w64-mingw32-gcc min - if: matrix.os == 'windows-latest' - - # Build for macOS - - name: Build (macOS) - run: nimble build -y -d:release -d:ssl -d:useOpenSsl3 --opt:size - if: matrix.os == 'macos-13' - - # UPX compress (linux) - - name: UPX - uses: svenstaro/upx-action@v2 - with: - files: | - min - args: --best --force - if: matrix.os == 'ubuntu-latest' - - # UPX compress (Windows) - - name: UPX - uses: svenstaro/upx-action@v2 - with: - files: | - min.exe - args: --best --force - if: matrix.os == 'windows-latest' - - - uses: suisei-cn/actions-download-file@818d6b7dc8fe73f2f924b6241f2b1134ca1377d9 # 1.6.0 - id: downloadCaCertPem # Remember to give an ID if you need the output filename - name: Fix Windows certs issue https://forum.nim-lang.org/t/7551 - with: - url: "https://curl.se/ca/cacert.pem" - target: . - if: matrix.os == 'windows-latest' - - # Install tests deps - - name: Install tests deps - run: cd ./tests && ../min install - - # Test (*nix) - - name: Test - run: ./min tests/all.min - if: matrix.os == 'macos-13' || matrix.os == 'ubuntu-latest' - - # Test (Windows) - - name: Test - run: .\min.exe tests/all.min - if: matrix.os == 'windows-latest'
M CHANGELOG.mdCHANGELOG.md

@@ -1,5 +1,9 @@

## Changelog +### v560-0 (2026-06-18) + +- Re-released using [Convergent Versioning](https://h3rald.com/conver). + ### v0.48.0 (2026-06-03) BREAKING CHANGES
A VERSIONING.md

@@ -0,0 +1,7 @@

+This project uses the Convergent Versioning system. + +The version number is a 2-byte hexadecimal integer from 0x0000 to 0xFFFF, with the first three digitsindicating the project _dependability score_ and the last digit encoding the version impact, compatibility, and purpose. + +A version number compliant with Semantic Versioning can be derived from the project history, and will still be used if required by package managers or similar software. + +For more information, see the [Convergent Versioning specification](https://h3rald.com/conver).
M min.nimmin.nim

@@ -150,7 +150,7 @@ error getCurrentExceptionMsg()

debug getCurrentException().getStackTrace() terminate(10) - let usage* = """ $exe v$version [$os $arch] + let usage* = """ $exe $version [$os $arch] a small but practical concatenative programming language (c) 2014-$year Fabio Cevasco

@@ -189,7 +189,7 @@ -p, --prelude:<file.min> If specified, it loads <file.min> instead of the default prelude code

-r, --registry:<url> If specified, uses the specified url as MMM registry -v, —-version Print the program version""" % [ "exe", pkgName, - "version", pkgVersion, + "version", pkgVersionLabel, "os", hostOS, "arch", hostCPU, "year", $(now().year)
M min.nimblemin.nimble

@@ -1,6 +1,6 @@

# Package -version = "0.48.0" +version = "0.48.1" author = "Fabio Cevasco" description = "A small but practical concatenative programming language and shell." license = "MIT"
M min.ymlmin.yml

@@ -2,4 +2,4 @@ author: Fabio Cevasco

description: A small but practical concatenative programming language and shell. id: 328473977 name: min -version: 0.48.0+version: 5600
M minpkg/core/meta.nimminpkg/core/meta.nim

@@ -5,6 +5,7 @@ const ymlconfig = "../../min.yml".slurp

var pkgName* {.threadvar.}: string var pkgVersion* {.threadvar.}: string +var pkgVersionLabel* {.threadvar.}: string var pkgAuthor* {.threadvar.}: string var pkgDescription* {.threadvar.}: string

@@ -14,6 +15,7 @@ if pair[0].strip == "name":

pkgName = pair[1].strip if pair[0].strip == "version": pkgVersion = pair[1].strip + pkgVersionLabel = "v"&pkgVersion[0..2]&"-"&pkgVersion[3] if pair[0].strip == "author": pkgAuthor = pair[1].strip if pair[0].strip == "description":
M site/contents/about.mdsite/contents/about.md

@@ -21,7 +21,7 @@ I always wanted to build a minimalist language, but that could also be used for real work and provided a standard library for common tasks and functionalities like regular expression support, cryptography, execution of external programs, shell-like operators, and keywords to work with files, and more.

Additionally, I wanted it to be fully self-contained, cross-platform, and small. Not stupidly small, but I feel it's a good compromise compared to the alternatives out there, considering that you only need _one file_ to run any min program. - I also created a static site generator called [HastySite](https://github.com/h3rald/hastysite), which also powers <https://min-lang.org>. HastySite internally uses min as the language to write the [rules](https://github.com/h3rald/min/blob/master/site/rules.min) to process the source files of the site, and also all its [scripts](https://github.com/h3rald/min/tree/master/site/scripts). + I also created a static site generator called [HastySite](https://git.sr.ht/~h3rald/hastysite), which also powers <https://min-lang.org>. HastySite internally uses min as the language to write the [rules](https://git.sr.ht/~h3rald/min/tree/master/item/site/rules.min) to process the source files of the site, and also all its [scripts](https://git.sr.ht/~h3rald/min/tree/master/item/site/scripts). Finally, I think more and more people should get to know concatenative programming languages, because [concatenative programming matters](http://evincarofautumn.blogspot.it/2012/02/why-concatenative-programming-matters.html).

@@ -39,4 +39,4 @@ Special thanks to [mwgkgk](https://github.com/mwgkgk) for contributing to the design of native dictionaries.

## When? -min source code [repository](https://github.com/h3rald/min) was created on November 8^th 2014. This only means that I've been very slowly developing something that was actually made public at the end of July 2017. +min source code [repository](https://git.sr.ht/~h3rald/min) was created on November 8^th 2014. This only means that I've been very slowly developing something that was actually made public at the end of July 2017.
M site/contents/get-started.mdsite/contents/get-started.md

@@ -8,7 +8,7 @@ {{guide-download}}

## Installing min -You can install min either by using [Nimble](https://github.com/nim-lang/nimble) or by cloning the [repository](https://github.com/h3rald/min) and building from source. +You can install min either by using [Nimble](https://github.com/nim-lang/nimble) or by cloning the [repository](https://git.sr.ht/~h3rald/min) and building from source. ### Using nimble

@@ -20,7 +20,7 @@ ### Building from source

By default, min should run without issues on any [platform supported by the Nim programming language](https://github.com/nim-lang/Nim/blob/devel/lib/system/platforms.nim). -To build min, you can clone the [git repository](https://github.com/h3rald/min) and compile it using Nim, like this: +To build min, you can clone the [git repository](https://git.sr.ht/~h3rald/min) and compile it using Nim, like this: ```shell nim c -d:release

@@ -158,5 +158,5 @@

## Syntax highlighting * If you are using [Visual Studio Code](https://code.visualstudio.com/), you can install the official [min extension](https://marketplace.visualstudio.com/items?itemName=h3rald.vscode-min-lang) which provides syntax highlighting support, code folding, and auto-indentation. -* If you are using [Vim](https://www.vim.org), a [min.vim](https://github.com/h3rald/min/blob/master/min.vim) syntax definition file is available in the min repo. +* If you are using [Vim](https://www.vim.org), a [min.vim](https://git.sr.ht/~h3rald/min/tree/master/item/min.vim) syntax definition file is available in the min repo. * If you are using [Sublime Text 3](https://www.sublimetext.com/3), Rafael Carrasco created a min syntax definition file that is available [here](https://github.com/rscarrasco/min-sublime-syntax).
M site/contents/home.mdsite/contents/home.md

@@ -9,11 +9,9 @@ with a minimalist syntax, a small but practical standard library, and an advanced

REPL. All packed in a single file. </section> <section class="centered pure-u-1 pure-u-md-1-3"> - <a class="pure-button pure-button-primary" href="/get-started/"><i class="ti-download"></i> get min v{{$version}}</a><br /> + <a class="pure-button pure-button-primary" href="/get-started/"><i class="ti-download"></i> get min {{$version}}</a><br /> <small> - <a href="https://github.com/h3rald/min">Repository</a> | - <a href="https://github.com/h3rald/min/issues">Issues</a> | - <a href="https://github.com/h3rald/min/discussions">Discussions</a> | + <a href="https://git.sr.ht/~h3rald/min">Repository</a> | <a href="https://h3rald.com/min/Min_DeveloperGuide.htm">Guide</a> <br> <a href="https://www.youtube.com/watch?v=vyHuh_kGR28&list=PLxLdEZg8DRwRXNrY7yyGU0-g_GRSyRGKo&index=12">NimConf 2021 Talk</a> </small>
M site/contents/learn-extending.mdsite/contents/learn-extending.md

@@ -50,7 +50,7 @@ 1. Install min sources using Nifty as explained in the {#link-page||download||Download#} section.

2. Import it in your Nim file. 3. Implement a new `proc` to define the module. -The following code is taken from [HastySite](https://github.com/h3rald/hastysite) and shows how to define a new `hastysite` module containing some symbols (`preprocess`, `postprocess`, `process-rules`, ...): +The following code is taken from [HastySite](https://git.sr.ht/~h3rald/hastysite) and shows how to define a new `hastysite` module containing some symbols (`preprocess`, `postprocess`, `process-rules`, ...): ``` import min

@@ -89,6 +89,6 @@

> %tip% > Tip > -> For more information on how to create new modules with Nim, have a look in the [lib folder](https://github.com/h3rald/min/tree/master/minpkg/lib) of the min repository, which contains all the min modules included in the standard library. +> For more information on how to create new modules with Nim, have a look in the [lib folder](https://git.sr.ht/~h3rald/min/tree/master/minpkg/lib) of the min repository, which contains all the min modules included in the standard library. {#link-learn||mmm||min Module Management#}
M site/contents/learn-mmm.mdsite/contents/learn-mmm.md

@@ -102,5 +102,5 @@ - **deps** set to an object with the keys corresponding to module names and the values to their respective versions

### Publishing -If you want to publish your module, just create a PR on the [min git repository](https://github.com/h3rald/min) and modify [this file](https://github.com/h3rald/min/blob/master/site/assets/mmm.json) by adding the metadata for your module. +If you want to publish your module, just create a PR on the [min git repository](https://git.sr.ht/~h3rald/min) and modify [this file](https://git.sr.ht/~h3rald/min/tree/master/item/site/assets/mmm.json) by adding the metadata for your module.
M site/contents/learn-shell.mdsite/contents/learn-shell.md

@@ -21,7 +21,7 @@ ...plus in can obviously leverage the entire min language for complex scripting.

## Autocompletion and shortcuts -The min shell features smart tab autocompletion and keyboard shortcut implemented using the [minline](https://github.com/h3rald/minline) library. +The min shell features smart tab autocompletion and keyboard shortcut implemented using the [minline](https://git.sr.ht/~h3rald/minline) library. The following behaviors are implemented when pressing the `TAB` key within:
M site/settings.jsonsite/settings.json

@@ -6,5 +6,5 @@ "rules": "rules.min",

"temp": "temp", "templates": "templates", "title": "min language", - "version": "0.48.0" + "version": "v560-0" }
D tasks/github.min

@@ -1,161 +0,0 @@

-#!/usr/bin/env min - -"_helpers" require :helpers 'helpers import - -"next-release.md" fs.read xml.escape escape :release-body -"tasks/data/draft-release.json" fs.read :draft-release-template - -config "version" dict.get :min-version -env "github-token" dict.get :token -draft-release-template ("version" min-version "body" release-body) =% :draft-release-body - -{} - "application/vnd.github.v3+json" "Accept" dict.set - "token $#" (token) =% "Authorization" dict.set -:headers - -( - symbol handle-errors - (dict :response ==>) - ( - response to-json "response.json" fs.write - response "status" dict.get :status - (status 300 >) ( - response "body" dict.get from-json :body - body "message" dict.get :message - status string @status - "Error $#: $#" (status message) =% io.error status integer exit - ) when - ) -) :: -;; Handles HTTP errors. - -( - symbol gh-req - (dict :data ==> dict|quot :result) - ( - data "endpoint" dict.get :endpoint - "api" :subdomain - (data 'subdomain dict.has?) (data "subdomain" dict.get @subdomain) when - "https://$#.github.com/repos/h3rald/min$#" (subdomain endpoint) =% :url - {} - url "url" dict.set - data "method" dict.get "method" dict.set - (data 'headers dict.has?) - (data "headers" dict.get "headers" dict.set) - (headers "headers" dict.set) - if - (data 'body dict.has?) (data "body" dict.get "body" dict.set) when - :req - ;req to-json puts! - req http.request :response - response "status" dict.get :status - response "body" dict.get :body - response handle-errors - (body length 0 >) (body from-json) ({}) if - @result - ) -) :: -;; Execute a request using the Github API. - -( - symbol get-assets - (dict :data ==> quot :result) - ( - data "id" dict.get :id - {} - "/releases/$#/assets" (id) =% "endpoint" dict.set - "GET" "method" dict.set - gh-req @result - ) -) :: -;; Retrieve the assets from an existing Github release. - -( - symbol delete-assets - (dict :config ==>) - ( - config get-assets :assets - config "id" dict.get :id - assets ("id" dict.get) map :assets-ids - assets-ids ( - :asset - {} - "/releases/assets/$#" (asset) =% "endpoint" dict.set - "DELETE" "method" dict.set - gh-req stack.pop - ) foreach - ) -) :: -;; Delete all assets from an existing Github release. - -#|| Tasks ||# - -( - symbol draft - (==>) - ( - {} - "/releases" "endpoint" dict.set - "POST" "method" dict.set - draft-release-body "body" dict.set - gh-req "id" dict.get string :id - ;; Save Release ID to min.yml - config id "id" dict.set to-yaml "min.yml" fs.write - "Draft release v$# ($#) created successfully" (min-version id) =% io.notice! - ) -) :: -;; Creates a new draft release on Github. - -( - symbol update - (==>) - ( - config "id" dict.get :id - {} - "/releases/$#" (id) =% "endpoint" dict.set - "PATCH" "method" dict.set - draft-release-body "body" dict.set - gh-req "id" dict.get string :id - "Draft release v$# ($#) updated successfully" (min-version id) =% io.notice! - ) -) :: -;; Updates the text of the current draft Github release. - -( - symbol assets - (==>) - ( - config get-assets =assets - assets size :total - "are" :verb - (total 1 ==) ("is" @verb) when - "There $# $# assets in release v$#" (verb total min-version) =% io.notice! - assets ("name" dict.get () stack.cons "- $#" stack.swap % io.notice!) foreach - ) -) :: -;; Retrieve a list of all the assets of the current draft Github release. - -( - symbol upload - (==>) - ( - config "id" dict.get :id - config delete-assets - sys.pwd sys.ls ("\\.zip$" match?) filter - ( - fs.filename :file - "Uploading: $#" (file) =% io.notice! - file fs.read :body - headers "application/zip" "Content-Type" dict.set :asset-headers - {} - "/releases/$#/assets?name=$#" (id file) =% "endpoint" dict.set - asset-headers "headers" dict.set - "uploads" "subdomain" dict.set - "POST" "method" dict.set - body "body" dict.set - gh-req stack.pop - ) foreach - ) -) :: -;; Uploads all assets to the current draft Github release, deleting any existing asset.
M tasks/release.mintasks/release.min

@@ -1,1 +1,15 @@

-#!/usr/bin/env min "build" require :build "github" require :github #| Tasks |# ( symbol default (==>) ( build.guide build.site build.vim build.windows build.linux build.macosx github.update github.upload ) ) :: ;; Builds min executables and updates the current draft Github release. +#!/usr/bin/env min + +"build" require :build + +#| Tasks |# +( + symbol default + (==>) + ( + build.guide + build.site + build.vim + ) +) :: +;; Builds min executables and updates the current draft Github release.
D tasks/version.min

@@ -1,99 +0,0 @@

-#!/usr/bin/env min - -"min.yml" :yaml-cfg -"min.nimble" :nimble-cfg -"site/settings.json" :json-site-cfg - -yaml-cfg fs.read from-yaml :config -config "version" dict.get :old-version -nimble-cfg fs.read :nimble-data - - -( - symbol update-yaml-config - ('sym :new-version ==>) - ( - config new-version "version" dict.set @config - config to-yaml yaml-cfg fs.write - ) -) :: -;; Sets the version in the min.yml file to new-version. - -( - symbol update-site-config - ('sym :new-version ==>) - ( - json-site-cfg fs.read from-json :site-config - site-config new-version "version" dict.set @site-config - site-config to-json json-site-cfg fs.write - ) -) :: -;; Updates the version of the web site to new-version. - -( - symbol update-nimble-config - ('sym :new-version ==>) - ( - "(version\\s+=\\s*)([^\\s]+)(\\s*)" :version-regexp - nimble-data version-regexp - (stack.dup 1 get :start 3 get :end "$#\"$#\"$#" (start new-version end) =%) replace-apply @nimble-data - nimble-data nimble-cfg fs.write - ) -) :: -;; Updates the version in the nimble file to new-version. - -#|| Tasks ||# - -( - symbol set - (==>) - ( - "" :new-version - false :valid-semver - (valid-semver not) - ( - "New version" io.ask @new-version - new-version semver? @valid-semver - ) while - new-version update-yaml-config - new-version update-site-config - ) -) :: -;; Asks and sets the new min version where appropriate. - -( - symbol major - (==>) - ( - old-version semver-inc-major :new-version - new-version update-yaml-config - new-version update-site-config - new-version update-nimble-config - ) -) :: -;; Increments the min major version. - -( - symbol minor - (==>) - ( - old-version semver-inc-minor :new-version - new-version update-yaml-config - new-version update-site-config - new-version update-nimble-config - ) -) :: -;; Increments the min minor version. - -( - symbol patch - (==>) - ( - old-version semver-inc-patch :new-version - new-version update-yaml-config - new-version update-site-config - new-version update-nimble-config - ) -) :: -;; Increments the min patch version. -