From 7dcdc22908cc379c9cf133bfe49f3a9e566341bd Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:03:29 -0800 Subject: [PATCH 1/7] Adding init defaults. --- CHANGELOG.md | 2 ++ examples/joomla-init/README.md | 7 +++++++ inits/joomla.js | 6 ++++++ 3 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95af926..22d5dad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }}) +* Added defaults for initialization. + ## v1.8.0 - [December 9, 2024](https://github.com/lando/joomla/releases/tag/v1.8.0) * Optimized for `midcore` diff --git a/examples/joomla-init/README.md b/examples/joomla-init/README.md index a2b25d0..1c27fb9 100644 --- a/examples/joomla-init/README.md +++ b/examples/joomla-init/README.md @@ -52,6 +52,13 @@ lando mysql -ujoomla -pjoomla joomla -e quit # Should have console available cd joomla lando composer list + +# Should have defaults in the .lando.yml file +cd joomla +cat .lando.yml | grep "php: 7.4" +cat .lando.yml | grep "via: apache" +cat .lando.yml | grep "xdebug: false" +cat .lando.yml | grep "database: mysql" ``` ## Destroy tests diff --git a/inits/joomla.js b/inits/joomla.js index b9c449b..8b6c2a5 100644 --- a/inits/joomla.js +++ b/inits/joomla.js @@ -5,4 +5,10 @@ */ module.exports = { name: 'joomla', + defaults: { + php: '7.4', + via: 'apache', + xdebug: false, + database: 'mysql', + }, }; From 0a81ba695a8c376b740f22a7cfbc1d1bff8931d8 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:35:56 -0800 Subject: [PATCH 2/7] Update tests of init defaults. --- examples/joomla-init/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/joomla-init/README.md b/examples/joomla-init/README.md index 1c27fb9..bc3753c 100644 --- a/examples/joomla-init/README.md +++ b/examples/joomla-init/README.md @@ -53,12 +53,13 @@ lando mysql -ujoomla -pjoomla joomla -e quit cd joomla lando composer list -# Should have defaults in the .lando.yml file +# Should have defaults in the .lando.yml file and still have webroot cd joomla -cat .lando.yml | grep "php: 7.4" +cat .lando.yml | grep 'php: "7.4"' cat .lando.yml | grep "via: apache" cat .lando.yml | grep "xdebug: false" cat .lando.yml | grep "database: mysql" +cat .lando.yml | grep "webroot: ." ``` ## Destroy tests From 6450ea2515234828b50f87740d5373d41fce9138 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:10:06 -0800 Subject: [PATCH 3/7] Debugging code. --- examples/joomla-init/README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/joomla-init/README.md b/examples/joomla-init/README.md index bc3753c..d30f692 100644 --- a/examples/joomla-init/README.md +++ b/examples/joomla-init/README.md @@ -53,6 +53,10 @@ lando mysql -ujoomla -pjoomla joomla -e quit cd joomla lando composer list +# Should cat the lando.yml file +cd joomla +cat .lando.yml + # Should have defaults in the .lando.yml file and still have webroot cd joomla cat .lando.yml | grep 'php: "7.4"' From bf85d7a5c2c7fc1018af7f37c651b52f727db059 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:17:25 -0800 Subject: [PATCH 4/7] Debugging init test. --- examples/joomla-init/README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/examples/joomla-init/README.md b/examples/joomla-init/README.md index d30f692..cea0509 100644 --- a/examples/joomla-init/README.md +++ b/examples/joomla-init/README.md @@ -53,17 +53,9 @@ lando mysql -ujoomla -pjoomla joomla -e quit cd joomla lando composer list -# Should cat the lando.yml file -cd joomla -cat .lando.yml - -# Should have defaults in the .lando.yml file and still have webroot +# Should have defaults in the .lando.yml file cd joomla cat .lando.yml | grep 'php: "7.4"' -cat .lando.yml | grep "via: apache" -cat .lando.yml | grep "xdebug: false" -cat .lando.yml | grep "database: mysql" -cat .lando.yml | grep "webroot: ." ``` ## Destroy tests From 8275d4ae9d2c1f93233489d2020d3854ccc1f8e0 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Fri, 20 Dec 2024 13:20:51 -0800 Subject: [PATCH 5/7] Debugging init test. --- examples/joomla-init/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/joomla-init/README.md b/examples/joomla-init/README.md index cea0509..9be7d33 100644 --- a/examples/joomla-init/README.md +++ b/examples/joomla-init/README.md @@ -55,7 +55,7 @@ lando composer list # Should have defaults in the .lando.yml file cd joomla -cat .lando.yml | grep 'php: "7.4"' +cat .lando.yml | grep "via: apache" ``` ## Destroy tests From 5b725256986ff369112d07c34125990d5dd02844 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:28:42 -0800 Subject: [PATCH 6/7] Try removing cache: npm. --- .github/workflows/pr-joomla-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-joomla-tests.yml b/.github/workflows/pr-joomla-tests.yml index 7a52dc4..8d19503 100644 --- a/.github/workflows/pr-joomla-tests.yml +++ b/.github/workflows/pr-joomla-tests.yml @@ -38,7 +38,6 @@ jobs: with: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org - cache: npm - name: Install NPM dependencies run: npm clean-install --production --prefer-offline --frozen-lockfile - name: Bundle Deps From ba433e7ba19a221a1f2b403e4b9c95cbbd6cf633 Mon Sep 17 00:00:00 2001 From: Alec Reynolds <1153738+reynoldsalec@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:49:42 -0800 Subject: [PATCH 7/7] Remove additional npm dependency install options. --- .github/workflows/pr-joomla-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-joomla-tests.yml b/.github/workflows/pr-joomla-tests.yml index 8d19503..39e9cf5 100644 --- a/.github/workflows/pr-joomla-tests.yml +++ b/.github/workflows/pr-joomla-tests.yml @@ -39,7 +39,7 @@ jobs: node-version: ${{ matrix.node-version }} registry-url: https://registry.npmjs.org - name: Install NPM dependencies - run: npm clean-install --production --prefer-offline --frozen-lockfile + run: npm clean-install --production - name: Bundle Deps uses: lando/prepare-release-action@v3 with: