Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,51 @@ jobs:

- name: Run tests
run: mix test --warnings-as-errors

generated-project:
name: Generate and deploy a grisp_new project
runs-on: ubuntu-24.04

steps:
- name: Check out repository
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false

- name: Install Erlang and Elixir
uses: erlef/setup-beam@54075bcc5e249e4758d363f27d099f55d843f124 # v1.24.1
with:
otp-version: "29"
elixir-version: "1.20"

- name: Restore GRiSP OTP package cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/grisp
key: ${{ runner.os }}-grisp2-otp-29

- name: Install Hex, Rebar, and grisp_new
run: |
mix local.hex --force
mix local.rebar --force
mix archive.install hex grisp_new 1.0.0 --force

- name: Generate project
run: mix grisp.new --no-interactive --name ci_grisp_project --otp-version 29

- name: Use the checked-out mix_grisp plugin
run: |
sed -i 's|{:mix_grisp, "~> 1.0", runtime: false}|{:mix_grisp, path: "..", runtime: false}|' ci_grisp_project/mix.exs
grep -Fq '{:mix_grisp, path: "..", runtime: false}' ci_grisp_project/mix.exs

- name: Fetch generated project dependencies
working-directory: ci_grisp_project
run: mix deps.get

- name: Build deployment bundle
working-directory: ci_grisp_project
run: mix grisp.deploy --tar

- name: Verify deployment bundle
working-directory: ci_grisp_project
run: test -s _grisp/deploy/grisp2.ci_grisp_project.0.1.0.tar.gz
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Port the `rebar3_grisp` workflow to Mix with tasks for building custom OTP
systems, deploying releases, generating firmware, creating software update
packages, listing pre-built packages, and collecting bug reports.
- Add `mix grisp.configure` to create GRiSP-ready Elixir projects, including
release, Ethernet, optional Wi-Fi, distributed Erlang, and GRiSP.io
configuration. Existing project files are preserved in interactive mode.
- Add support for projects created by the separately distributed `grisp_new`
archive, including release, Ethernet, optional Wi-Fi, distributed Erlang,
and GRiSP.io configuration.
- Add release selection, archive deployment, custom destinations, pre- and
post-deployment scripts, and forwarding of options to `mix release`.
- Add support for local and Docker GRiSP toolchains, custom OTP builds, and
Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,24 @@ mix grisp.version

## Create a new application

The configure task creates a supervised Mix application with release and GRiSP
configuration, plus optional networking files:
Install the dependency-free `grisp_new` archive to make the project generator
available globally:

```console
mix grisp.configure
mix archive.install hex grisp_new
```

Its configure task creates a supervised Mix application with release and
GRiSP configuration, plus optional networking files:

```console
mix grisp.new
```

For non-interactive use:

```console
mix grisp.configure --no-interactive --name my_grisp_app \
mix grisp.new --no-interactive --name my_grisp_app \
--ssid mywifi --psk wifipsk
```

Expand Down
69 changes: 0 additions & 69 deletions lib/mix/tasks/grisp/configure.ex

This file was deleted.

Loading
Loading