From b3b6b8b7168ef9c25ccfb44c7cb827909bcfa9cc Mon Sep 17 00:00:00 2001 From: elijahr Date: Tue, 5 Nov 2024 11:45:33 -0600 Subject: [PATCH 1/7] Update various dependencies --- .githooks/pre-commit | 45 ++++++++--------------- .github/workflows/build.yml | 42 +++++++++++----------- .github/workflows/lint.yml | 72 ++++++------------------------------- .lintballrc.json | 30 ++++++++++------ Dockerfile | 4 +-- README.md | 46 +++++++++++------------- bin/help.overview | 2 +- package.json | 7 ++-- test/integration.bats | 9 ++--- 9 files changed, 97 insertions(+), 160 deletions(-) diff --git a/.githooks/pre-commit b/.githooks/pre-commit index b2838fa..acacd25 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -1,38 +1,21 @@ #!/usr/bin/env bash -set -ueo pipefail +# Run lintball using Docker on git commit -# Ensure ARM64 homebrew and /usr/local/bin are in PATH before system PATH. -# This finds /usr/local/bin/lintball and finds newer Homebrew-installed bash. -export PATH -PATH=~/.asdf/shims":/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/local/sbin:$PATH" +set -eu -export LINTBALL_DIR -LINTBALL_DIR="${LINTBALL_DIR:-node_modules/lintball}" +workspace=$(git rev-parse --show-toplevel || true) +if [[ -z ${workspace} ]]; then + echo "Could not determine git repository path" >&2 + exit 1 +fi -if [ -f "${LINTBALL_DIR}/bin/lintball" ]; then - "${LINTBALL_DIR}/bin/lintball" pre-commit -elif [ -n "$(command -v lintball)" ]; then - lintball pre-commit +if [[ -f "${workspace}/scripts/build-local-docker-image.sh" ]]; then + # This is lintball itself, build and use the local image + "${workspace}/scripts/build-local-docker-image.sh" + image=lintball:local else - { - echo - echo "Error: could not find a lintball executable, but lintball's pre-commit hook is enabled." - echo - echo "Solutions:" - echo - echo '- Install lintball globally:' - echo ' npm install -g lintball' - echo '- And/or, ensure that that lintball can be found in PATH:' - # shellcheck disable=SC2016 - echo ' ln -s "$(command -v lintball)" /usr/local/bin/' - echo - echo 'Workarounds:' - echo - echo '- Disable all git hooks:' - echo ' git config --local core.hooksPath ""' - echo "- Delete ${BASH_SOURCE[0]}" - echo - } >&2 - exit 1 + image=elijahru/lintball:latest fi + +docker run -v "${workspace}:/workspace" "${image}" lintball pre-commit diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 13f3344..c123ffd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ name: build # yamllint disable rule:truthy on: pull_request: - branches: ['*'] + branches: ["*"] paths: - .github/workflows/build.yml # changes to this file - bin/** # changes to asdf entrypoint scripts @@ -15,8 +15,8 @@ on: - test/** # changes to tests - package*.json # bats upgrade push: - branches: ['main'] - tags: ['*'] + branches: ["main"] + tags: ["*"] paths: - .github/workflows/build.yml # changes to this file - bin/** # changes to asdf entrypoint scripts @@ -38,11 +38,11 @@ jobs: steps: - name: Checkout plugin - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - uses: actions/setup-node@v2 + - uses: actions/setup-node@v4 with: - node-version: '15' + node-version: "22" - name: Run tests run: | @@ -60,39 +60,39 @@ jobs: include: # Stable binary - os: ubuntu-latest - nim-version: 'latest:1.6' + nim-version: "latest:1.6" platform: linux-glibc # Stable binary - os: ubuntu-latest - nim-version: 'latest:1.4' + nim-version: "latest:2.2" platform: linux-glibc # Unstable binary - os: ubuntu-latest - nim-version: 'ref:version-1-6' + nim-version: "ref:version-2-0" platform: linux-glibc # Unstable binary - os: macos-latest - nim-version: 'ref:devel' + nim-version: "ref:devel" platform: macOS # Build from source - os: ubuntu-latest - nim-version: 'ref:HEAD' + nim-version: "ref:HEAD" platform: linux-glibc # Build from source - os: macos-latest - nim-version: 'latest:1.4' + nim-version: "latest:2.2" platform: macOS steps: # Optimization: re-use cached Nim->C compilation - name: Restore cache if: matrix.nim-version != 'ref:HEAD' && matrix.nim-version != 'latest' - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache key: cache-${{ matrix.os }}-${{ matrix.nim-version }} @@ -105,7 +105,7 @@ jobs: uses: asdf-vm/actions/setup@v1 - name: Checkout plugin - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install asdf-nim & test shell: bash @@ -120,14 +120,14 @@ jobs: # Test musl installation plugin_test_x86_musl: - name: 👑1.6.8/linux-musl/x86_64 + name: 👑2.2.x/linux-musl/x86_64 runs-on: ubuntu-latest container: alpine:latest steps: # Optimization: re-use cached Nim->C compilation - name: Restore cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache key: cache-ubuntu-latest-${{ matrix.nim-version }} @@ -139,7 +139,7 @@ jobs: uses: asdf-vm/actions/plugin-test@v1 with: command: nim -v - version: 'latest:1.6' + version: "latest:2.2" # Test installation for a few non-x86 architectures plugin_test_non_x86: @@ -152,24 +152,24 @@ jobs: include: # Unstable binary - runs-on: ubuntu-latest - nim-version: 'ref:version-1-6' + nim-version: "ref:version-2-2" arch: aarch64 # Unstable binary - runs-on: ubuntu-latest - nim-version: 'ref:version-1-4' + nim-version: "ref:version-1-6" arch: armv7 steps: # Optimization: re-use cached Nim->C compilation - name: Restore cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: ~/.cache key: cache-${{ matrix.arch }}-${{ matrix.nim-version }} - name: Checkout plugin - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Install & run tests on non-x86 - uses: uraimo/run-on-arch-action@v2 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8371daa..790e857 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,74 +1,22 @@ -name: lint - +name: Lint # yamllint disable rule:truthy on: pull_request: - branches: ['*'] + branches: ["*"] push: - branches: ['*'] - tags: ['*'] + branches: ["*"] + tags: ["*"] # yamllint enable rule:truthy jobs: lint: - name: Lint + name: lint + runs-on: ubuntu-latest + steps: - name: Checkout code - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - uses: actions/setup-node@v2 - with: - node-version: '15' - - - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - - name: Install shfmt - uses: mfinelli/setup-shfmt@v2 - - - name: Install lintball - run: | - npm install -g lintball@1.6.0 - lintball install-tools --yes sh yml md - - - name: Check for linter issues - shell: bash - run: | - set -uexo pipefail + uses: actions/checkout@v4 - default_branch=main - if [ "$GITHUB_REF" = "refs/heads/$default_branch" ]; then - # A push to the default branch. - # Check files which were changed in the most recent commit. - commitish="HEAD~1" - elif [ -n "$GITHUB_BASE_REF" ]; then - # A pull request. - # Check files which have changed between the merge base and the - # current commit. - commitish="$(git merge-base -a refs/remotes/origin/$GITHUB_BASE_REF $GITHUB_SHA)" - else - # A push to a non-default, non-PR branch. - # Check files which have changed between default branch and the current - # commit. - commitish="$(git merge-base -a refs/remotes/origin/${default_branch} $GITHUB_SHA)" - fi - # Get the list of changed files - files="$(git diff --name-only "$commitish")" - # Check if any lintball configuration was changed. If so, check all files. - status=0 - case "$files" in - *lintballrc.json* | *.yamllint.yml* | *lint.yml*) lintball check || status=$? ;; - *) lintball check --since "$commitish" || status=$? ;; - esac - if [ "$status" -gt 0 ]; then - echo - echo "The above issues were found by lintball." - echo "To detect and auto-fix issues before pushing, install lintball's git hooks." - echo "See https://github.com/elijahr/lintball" - echo - exit $status - fi + - name: Run lintball + uses: elijahr/lintball@v2 diff --git a/.lintballrc.json b/.lintballrc.json index 7ebc9a4..b826c3b 100644 --- a/.lintballrc.json +++ b/.lintballrc.json @@ -1,9 +1,26 @@ { + "lintballrc_version": "2", "check_args": { - "yamllint": "-c ./.yamllint.yml" + "yamllint": [ + "{{tool}}", + "--format", + "{{format}}", + "--strict", + "--config-file", + "./.yamllint.yml", + "{{path}}" + ] }, "write_args": { - "yamllint": "-c ./.yamllint.yml" + "yamllint": [ + "{{tool}}", + "--format", + "{{format}}", + "--strict", + "--config-file", + "./.yamllint.yml", + "{{path}}" + ] }, "use": { "autoflake": false, @@ -14,16 +31,9 @@ "prettier": true, "prettier-eslint": true, "pylint": false, - "rubocop": false, "shellcheck": true, "shfmt": true, "yamllint": true }, - "ignores": [ - "*/.git/*", - "*/Gemfile.lock", - "*/Pipfile.lock", - "*/venv/*", - "*/src/*" - ] + "ignores": ["*/.git/*", "*/venv/*", "*/src/*"] } diff --git a/Dockerfile b/Dockerfile index 0060a83..40cc04f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,8 @@ FROM ubuntu RUN apt-get update && apt-get install -y git curl build-essential \ - && rm -rf /var/lib/apt/lists/* \ - && git clone https://github.com/asdf-vm/asdf.git ~/.asdf --depth 1 --single-branch --branch v0.10.2 \ + && rm -rf /var/lib/apt/lists/* \ + && git clone https://github.com/asdf-vm/asdf.git ~/.asdf --depth 1 --single-branch --branch v0.14.1 \ && echo '. $HOME/.asdf/asdf.sh' >> ~/.bashrc \ && echo '. $HOME/.asdf/completions/asdf.bash' >> ~/.bashrc diff --git a/README.md b/README.md index 02c2d2d..4d7a2d3 100644 --- a/README.md +++ b/README.md @@ -22,12 +22,12 @@ When available for the version and platform, the plugin will install pre-compile ```sh # latest stable version of Nim asdf install nim latest -# or latest stable minor/patch release of Nim 1.x.x -asdf install nim latest:1 -# or latest stable patch release of Nim 1.6.x -asdf install nim latest:1.6 +# or latest stable minor/patch release of Nim 2.x.x +asdf install nim latest:2 +# or latest stable patch release of Nim 2.2.x +asdf install nim latest:2.2 # or specific patch release -asdf install nim 1.6.8 +asdf install nim 2.2.0 ``` ### To install a nightly build of Nim: @@ -35,14 +35,10 @@ asdf install nim 1.6.8 ```sh # nightly unstable build of devel branch asdf install nim ref:devel +# or nightly unstable build of version-2-2 branch, i.e. the 2.2.x release + any recent backports from devel +asdf install nim ref:version-2-2 # or nightly unstable build of version-1-6 branch, i.e. the latest 1.6.x release + any recent backports from devel asdf install nim ref:version-1-6 -# or nightly unstable build of version-1-4 branch, i.e. the latest 1.4.x release + any recent backports from devel -asdf install nim ref:version-1-4 -# or nightly unstable build of version-1-2 branch, i.e. the 1.2.x release + any recent backports from devel -asdf install nim ref:version-1-2 -# or nightly unstable build of version-1-0 branch, i.e. the 1.0.x release + any recent backports from devel -asdf install nim ref:version-1-0 ``` ### To build a specific git commit or branch of Nim: @@ -52,14 +48,14 @@ asdf install nim ref:version-1-0 asdf install nim ref:HEAD # build using the specific commit 7d15fdd asdf install nim ref:7d15fdd -# build using the tagged release v1.6.8 -asdf install nim ref:v1.6.8 +# build using the tagged release v2.2.0 +asdf install nim ref:v2.2.0 ``` ### To set the default version of Nim for your user: ```sh -asdf global nim latest:1.6 +asdf global nim latest:2.2 ``` This creates a `.tool-versions` file in your home directory specifying the Nim version. @@ -68,7 +64,7 @@ This creates a `.tool-versions` file in your home directory specifying the Nim v ```sh cd my-project -asdf local nim latest:1.6 +asdf local nim latest:2.2 ``` This creates a `.tool-versions` file in the current directory specifying the Nim version. For additional plugin usage see the [asdf documentation](https://asdf-vm.com/#/core-manage-asdf). @@ -101,18 +97,18 @@ jobs: include: # Test against stable Nim builds on linux - os: ubuntu-latest - nim-version: latest:1.6 + nim-version: latest:2.2 - os: ubuntu-latest - nim-version: latest:1.4 + nim-version: latest:1.6 - # Test against unstable nightly Nim builds on macos (faster than building from source) + # Test against unstable nightly Nim builds on macos x64 (faster than building from source) - os: macos-latest - nim-version: ref:version-1-6 + nim-version: ref:version-2-2 - os: macos-latest - nim-version: ref:version-1-4 + nim-version: ref:version-1-6 steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Nim uses: asdf-vm/actions/install@v1 with: @@ -144,15 +140,15 @@ jobs: fail-fast: false matrix: include: - - nim-version: ref:version-1-6 + - nim-version: ref:version-2-2 arch: armv7 - - nim-version: ref:version-1-2 + - nim-version: ref:version-1-6 arch: aarch64 runs-on: ubuntu-latest steps: - name: Checkout Nim project - uses: actions/checkout@v2 + uses: actions/checkout@v4 - uses: uraimo/run-on-arch-action@v2 name: Install Nim & run tests @@ -172,7 +168,7 @@ jobs: # Install asdf and dependencies apt-get update -q -y apt-get -qq install -y build-essential curl git - git clone https://github.com/asdf-vm/asdf.git "${HOME}/.asdf" --branch v0.10.2 + git clone https://github.com/asdf-vm/asdf.git "${HOME}/.asdf" --branch v0.14.1 env: | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/bin/help.overview b/bin/help.overview index 172e3c1..28852cf 100755 --- a/bin/help.overview +++ b/bin/help.overview @@ -16,7 +16,7 @@ echo 'Unstable binaries:' echo '- Linux: x86_64, x86, armv7l, aarch64' echo '- macOS: x86_64' echo '- `asdf install nim ref:devel` for the latest nightly build of github.com/nim-lang/Nim/tree/devel' -echo '- `asdf install nim ref:version-1-6` for the latest nightly build of github.com/nim-lang/Nim/tree/version-1-6' +echo '- `asdf install nim ref:version-2-0` for the latest nightly build of github.com/nim-lang/Nim/tree/version-2-0' echo '- `asdf install nim ref:version-1-4` for the latest nightly build of github.com/nim-lang/Nim/tree/version-1-4' echo '- etc' echo diff --git a/package.json b/package.json index de720cf..2be74b9 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,8 @@ { "devDependencies": { - "bats": "^1.8.2", - "bats-assert": "git+https://github.com/bats-core/bats-assert.git#78fa631", - "bats-support": "^0.3.0", - "lintball": "^1.6.0" + "bats": "^1.11.0", + "bats-assert": "github:bats-core/bats-assert#e2d855b", + "bats-support": "^0.3.0" }, "scripts": { "test": "bats test --tap" diff --git a/test/integration.bats b/test/integration.bats index 4a1f096..465b7a3 100644 --- a/test/integration.bats +++ b/test/integration.bats @@ -7,9 +7,10 @@ load ../node_modules/bats-assert/load.bash load ./lib/test_utils setup_file() { + # shellcheck disable=SC2154 PROJECT_DIR="$(realpath "$(dirname "$BATS_TEST_DIRNAME")")" export PROJECT_DIR - cd "$PROJECT_DIR" + cd "$PROJECT_DIR" || exit clear_lock git ASDF_DIR="$(mktemp -t asdf-nim-integration-tests.XXXX -d)" @@ -17,7 +18,7 @@ setup_file() { get_lock git git clone \ - --branch=v0.10.2 \ + --branch=v0.14.1 \ --depth=1 \ https://github.com/asdf-vm/asdf.git \ "$ASDF_DIR" @@ -39,7 +40,7 @@ setup() { # `asdf plugin add nim .` would only install from git HEAD. # So, we install by copying the plugin to the plugins directory. cp -R "$PROJECT_DIR" "${ASDF_DATA_DIR}/plugins/nim" - cd "${ASDF_DATA_DIR}/plugins/nim" + cd "${ASDF_DATA_DIR}/plugins/nim" || exit # shellcheck disable=SC1090,SC1091 source "${ASDF_DIR}/asdf.sh" @@ -93,7 +94,7 @@ info() { assert [ -f "${ASDF_DATA_DIR}/shims/nimjson" ] # Assert that correct nimjson is used - assert [ -n "$(nimjson -v | grep ' version 1\.2\.8')" ] + assert [ -n "$(nimjson -v | grep ' version 1\.2\.8' || true)" ] # Assert that nim finds nimble packages echo "import nimjson" >"${ASDF_NIM_TEST_TEMP}/testnimble.nim" From c34d23e165c49a885ae930a873cfec063a69bb67 Mon Sep 17 00:00:00 2001 From: elijahr Date: Tue, 5 Nov 2024 11:57:14 -0600 Subject: [PATCH 2/7] Fix linter --- .github/workflows/lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 790e857..86c16fa 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,6 +17,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 # This is necessary for linting only recent changes - name: Run lintball uses: elijahr/lintball@v2 From 6900d5f9476a556faa8beba9933345ccb69b93f4 Mon Sep 17 00:00:00 2001 From: elijahr Date: Tue, 5 Nov 2024 12:02:28 -0600 Subject: [PATCH 3/7] Fix test --- test/utils.bats | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/utils.bats b/test/utils.bats index acd2564..48328ed 100644 --- a/test/utils.bats +++ b/test/utils.bats @@ -10,7 +10,7 @@ load ./lib/test_utils setup_file() { PROJECT_DIR="$(realpath "$(dirname "$BATS_TEST_DIRNAME")")" export PROJECT_DIR - cd "$PROJECT_DIR" + cd "$PROJECT_DIR" || exit clear_lock git } @@ -130,14 +130,15 @@ teardown() { assert_line 1.2.8 assert_line 1.4.0 assert_line 1.6.0 + assert_line 2.2.0 } @test "asdf_nim_list_all_versions__displays_in_order" { - assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.0' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.4.8' | sed 's/:.*//')" ] - assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.2' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.0' | sed 's/:.*//')" ] - assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.4' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.2' | sed 's/:.*//')" ] - assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.6' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.4' | sed 's/:.*//')" ] - assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.8' | sed 's/:.*//')" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.6' | sed 's/:.*//')" ] + assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.0' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.4.8' | sed 's/:.*//' | head -n1)" ] + assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.2' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.0' | sed 's/:.*//' | head -n1)" ] + assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.4' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.2' | sed 's/:.*//' | head -n1)" ] + assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.6' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.4' | sed 's/:.*//' | head -n1)" ] + assert [ "$(asdf_nim_list_all_versions | grep -Fn '1.6.8' | sed 's/:.*//' | head -n1)" -gt "$(asdf_nim_list_all_versions | grep -Fn '1.6.6' | sed 's/:.*//' | head -n1)" ] } @test "asdf_nim_normalize_os" { From 238716a3a8506bb8e2c6afe5bb0add7e0569608b Mon Sep 17 00:00:00 2001 From: elijahr Date: Tue, 5 Nov 2024 12:18:01 -0600 Subject: [PATCH 4/7] Upgrade asdf-vm actions --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c123ffd..11d7d18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,7 +102,7 @@ jobs: run: brew install bash parallel - name: Install asdf - uses: asdf-vm/actions/setup@v1 + uses: asdf-vm/actions/setup@v3 - name: Checkout plugin uses: actions/checkout@v4 From 62db1177b11beaccd79c0bce877103a5ac3dd9db Mon Sep 17 00:00:00 2001 From: elijahr Date: Tue, 5 Nov 2024 12:18:01 -0600 Subject: [PATCH 5/7] Upgrade asdf-vm actions --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c123ffd..11d7d18 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -102,7 +102,7 @@ jobs: run: brew install bash parallel - name: Install asdf - uses: asdf-vm/actions/setup@v1 + uses: asdf-vm/actions/setup@v3 - name: Checkout plugin uses: actions/checkout@v4 From d352ecacca3e811905daa40f86272c1dbd18dd13 Mon Sep 17 00:00:00 2001 From: elijahr Date: Wed, 6 Nov 2024 02:53:47 -0600 Subject: [PATCH 6/7] Use lintball v2 --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 4 ++-- .lintballrc.json | 3 +-- .shellcheckrc | 1 + .yamllint.yml | 4 ++-- docker-compose.yml | 2 +- lib/utils.bash | 14 +++++++------- 7 files changed, 16 insertions(+), 16 deletions(-) create mode 100644 .shellcheckrc diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index cf0b6cf..83f93ac 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,9 +1,9 @@ --- name: Bug report about: Create a report to help us improve -title: '' +title: "" labels: bug -assignees: '' +assignees: "" --- **Describe the bug** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 813c8ec..f52b3b9 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,9 +1,9 @@ --- name: Feature request about: Suggest an idea for this project -title: '' +title: "" labels: enhancement -assignees: '' +assignees: "" --- **Is your feature request related to a problem? Please describe.** diff --git a/.lintballrc.json b/.lintballrc.json index b826c3b..3505e31 100644 --- a/.lintballrc.json +++ b/.lintballrc.json @@ -34,6 +34,5 @@ "shellcheck": true, "shfmt": true, "yamllint": true - }, - "ignores": ["*/.git/*", "*/venv/*", "*/src/*"] + } } diff --git a/.shellcheckrc b/.shellcheckrc new file mode 100644 index 0000000..71534f0 --- /dev/null +++ b/.shellcheckrc @@ -0,0 +1 @@ +disable=SC2154,SC2312,SC2310 diff --git a/.yamllint.yml b/.yamllint.yml index 73d4b5c..1df7517 100644 --- a/.yamllint.yml +++ b/.yamllint.yml @@ -1,6 +1,6 @@ yaml-files: - - '*.yaml' - - '*.yml' + - "*.yaml" + - "*.yml" rules: braces: enable diff --git a/docker-compose.yml b/docker-compose.yml index cb0430b..b21f6db 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '3' +version: "3" services: asdf: build: diff --git a/lib/utils.bash b/lib/utils.bash index bb2b380..261b7d9 100644 --- a/lib/utils.bash +++ b/lib/utils.bash @@ -497,7 +497,7 @@ asdf_nim_download_via_git() { rm -rf "$ASDF_NIM_DOWNLOAD_PATH" mkdir -p "$ASDF_NIM_DOWNLOAD_PATH" ( - cd "$ASDF_NIM_DOWNLOAD_PATH" + cd "$ASDF_NIM_DOWNLOAD_PATH" || exit git init git remote add origin "$SOURCE_REPO" git fetch origin "$ASDF_INSTALL_VERSION" --depth 1 @@ -629,7 +629,7 @@ asdf_nim_fetch() { } asdf_nim_bootstrap_nim() { - cd "$ASDF_DOWNLOAD_PATH" + cd "$ASDF_DOWNLOAD_PATH" || exit local nim nim="./bin/nim" @@ -662,7 +662,7 @@ asdf_nim_build_koch() { local nim nim="$1" step_start "build koch" - cd "$ASDF_DOWNLOAD_PATH" + cd "$ASDF_DOWNLOAD_PATH" || exit # shellcheck disable=SC2046 eval "$nim" c --skipParentCfg:on $(printf ' %q ' "${NIM_ARGS[@]}") koch step_end "✓" @@ -670,7 +670,7 @@ asdf_nim_build_koch() { asdf_nim_build_nim() { step_start "build nim" - cd "$ASDF_DOWNLOAD_PATH" + cd "$ASDF_DOWNLOAD_PATH" || exit # shellcheck disable=SC2046 eval ./koch boot $(printf ' %q ' "${NIM_ARGS[@]}") step_end "✓" @@ -678,7 +678,7 @@ asdf_nim_build_nim() { asdf_nim_build_tools() { step_start "build tools" - cd "$ASDF_DOWNLOAD_PATH" + cd "$ASDF_DOWNLOAD_PATH" || exit # shellcheck disable=SC2046 eval ./koch tools $(printf ' %q ' "${NIM_ARGS[@]}") step_end "✓" @@ -686,7 +686,7 @@ asdf_nim_build_tools() { asdf_nim_build_nimble() { step_start "build nimble" - cd "$ASDF_DOWNLOAD_PATH" + cd "$ASDF_DOWNLOAD_PATH" || exit # shellcheck disable=SC2046 eval ./koch nimble $(printf ' %q ' "${NIM_ARGS[@]}") step_end "✓" @@ -696,7 +696,7 @@ asdf_nim_build_nimble() { asdf_nim_build() { section_start "II. Build (${ASDF_DOWNLOAD_PATH//${HOME}/\~})" - cd "$ASDF_DOWNLOAD_PATH" + cd "$ASDF_DOWNLOAD_PATH" || exit local bootstrap bootstrap=n local build_tools From 442e6e2ab20006ee3f0935e691658e246496f738 Mon Sep 17 00:00:00 2001 From: elijahr Date: Wed, 6 Nov 2024 02:57:26 -0600 Subject: [PATCH 7/7] Update changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 398d9bd..4f480a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## v2.0.2 - 2024-11-06 + +- test against newer nims +- update documentation for newer nims +- upgrade lintball + ## v2.0.1 - 2022-11-28 - fix: sorting for `asdf list-all nim`