Skip to content

Commit 038a523

Browse files
authored
ci(mise): add mise.toml and idiomatic version files (#3350)
* ci(mise): add mise.toml and idiomatic version files - Add `mise.toml` flags to use idiomatic version files - Reference `.env` in mise.toml to make sure env is loaded. - Add netlify-cli to mise tools install of an install - Add `.nvmrc` file for netlify to use the same version as build (`.node_version` isn't supported by netlify) - Update README to mention mise Signed-off-by: Charly Molter <charly.molter@konghq.com>
1 parent 159d67a commit 038a523

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22.21.1

Makefile

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ RUBY_MATCH := $(shell [[ "$(shell ruby -v)" =~ "ruby $(shell cat .ruby-version)"
77
.PHONY: ruby-version-check scaffold-plugin
88
ruby-version-check:
99
ifndef RUBY_MATCH
10-
$(error ruby $(RUBY_VERSION_REQUIRED) is required. Found $(RUBY_VERSION). $(newline)Run `rbenv install $(RUBY_VERSION_REQUIRED)`)$(newline)
10+
$(error ruby $(RUBY_VERSION_REQUIRED) is required. Found $(RUBY_VERSION). $(newline)Run 'mise activate' or prefix you make command with 'mise x --' see README.md for more information)$(newline)
1111
endif
1212

13-
install-prerequisites:
14-
npm install -g netlify-cli@16.5.1
15-
1613
# Installs npm packages and gems.
17-
install: ruby-version-check
14+
install:
15+
mise install
1816
git submodule update --init
1917
npm ci
2018
bundle install

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33

44
## Run Locally
55

6-
```bash
7-
# Install prerequisites
8-
make install-prerequisites
6+
Make sure you have [mise](https://mise.jdx.dev/getting-started.html)
7+
8+
If you want to make sure you will always use the right version of tools, [activate mise](https://mise.jdx.dev/getting-started.html#activate-mise).
99

10+
```bash
1011
# Install dependencies
1112
make install
1213

mise.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[settings]
2+
idiomatic_version_file_enable_tools = ["ruby", "node"] # Use idiomatic version file to ensure netlify uses the same version as dev
3+
[env]
4+
_.file = '.env'
5+
[tools]
6+
"npm:netlify-cli" = "16.5.1"

0 commit comments

Comments
 (0)