Skip to content

Commit

Permalink
fixup! chore: justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
mhanberg committed May 21, 2024
1 parent 6125225 commit a586849
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
31 changes: 25 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,35 @@ https://github.com/sponsors/mhanberg

## Development

Next LS uses [just](TODO) to coordinate command tasks.

```bash
# list all tasks
just --list
# show a fzf finder of all tasks
just choose

# default task, runs `deps compile build-local
just

# install deps
mix deps.get
just deps

# install compile
just compile

# start the local server for development in TCP mode
# see editor extension docs for information on how to connect to a server in TCP mode
bin/start --port 9000
just start

# run the tests
mix test
just test

# build a local burrito'd exe
just build-local

# build burrito'd exes for all platforms
just build-all
```

## Production release
Expand All @@ -59,18 +78,18 @@ Executables are output to `./burrito_out`.

```bash
# produces executables for all the targets specified in the `mix.exs` file
NEXTLS_RELEASE_MODE="burrito" MIX_ENV=prod mix release
just build-all

# produce an executable for a single target
BURRITO_TARGET=linux_amd64 MIX_ENV=prod mix release
just build-local
```

### Traditional

You can also build Next LS as a traditional Mix release.

```bash
MIX_ENV=prod mix release plain
just build-plain
```

## Contributing
Expand Down
1 change: 0 additions & 1 deletion config/runtime.exs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Config


if System.get_env("NEXTLS_OTEL") == "1" do
config :next_ls,
otel: true
Expand Down
20 changes: 20 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
default: deps compile build-local

choose:
just --choose

deps:
mix deps.get

Expand All @@ -12,6 +15,17 @@ start:
test:
mix test

format:
mix format

lint:
#!/usr/bin/env bash
set -euxo pipefail
mix format --check-formatted
mix credo
mix dialyzer

[unix]
build-local:
#!/usr/bin/env bash
Expand All @@ -38,3 +52,9 @@ build-local:

build-all:
NEXTLS_RELEASE_MODE=burrito MIX_ENV=prod mix release

build-plain:
MIX_ENV=prod mix release plain

bump-spitfire:
mix deps.update spitfire

0 comments on commit a586849

Please sign in to comment.