Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DDEV addon command to use ddev add-on get #53

Merged
merged 1 commit into from
Oct 27, 2024
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.

## UNRELEASED 1.9.0

- Updated to use `ddev add-on get` for versions of DDEV prior to v1.23.5

---

## Latest Release
Expand Down
4 changes: 2 additions & 2 deletions commands/host/frontend-update
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
LATEST_WOODOO_VERSION=$(curl -s https://api.github.com/repos/dermatz/ddev-woodoo-buildtools-magento/releases/latest | grep tag_name | cut -d '"' -f 4)

if [[ $1 == "-dev" ]]; then
ddev get https://github.com/dermatz/ddev-woodoo-buildtools-magento/archive/refs/heads/main.tar.gz
ddev add-on get https://github.com/dermatz/ddev-woodoo-buildtools-magento/archive/refs/heads/main.tar.gz
else
ddev get https://github.com/dermatz/ddev-woodoo-buildtools-magento/archive/refs/tags/"${LATEST_WOODOO_VERSION}".tar.gz
ddev add-on get https://github.com/dermatz/ddev-woodoo-buildtools-magento/archive/refs/tags/"${LATEST_WOODOO_VERSION}".tar.gz
fi
2 changes: 1 addition & 1 deletion install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: ddev-woodoo-buildtools-magento

pre_install_actions:
# https://github.com/Morgy93/ddev-gum
- if ! ddev get --installed | grep -q "Morgy93/ddev-gum"; then ddev get Morgy93/ddev-gum; fi
- if ! ddev add-on get --installed | grep -q "Morgy93/ddev-gum"; then ddev add-on get Morgy93/ddev-gum; fi
- "if [ -f .ddev/commands/web/woodoo_components/checks ]; then rm .ddev/commands/web/woodoo_components/checks && echo 'Woodoo Housekeeping: removed old file .ddev/commands/web/woodoo_components/checks'; fi"

project_files:
Expand Down
8 changes: 4 additions & 4 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ teardown() {
@test "install from directory" {
set -eu -o pipefail
cd ${TESTDIR}
echo "# ddev get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get ${DIR}
echo "# ddev add-on get ${DIR} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev add-on get ${DIR}
ddev restart
health_checks
}

@test "install from release" {
set -eu -o pipefail
cd ${TESTDIR} || ( printf "unable to cd to ${TESTDIR}\n" && exit 1 )
echo "# ddev get ${DDEV_ADDON} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev get ${DDEV_ADDON}
echo "# ddev add-on get ${DDEV_ADDON} with project ${PROJNAME} in ${TESTDIR} ($(pwd))" >&3
ddev add-on get ${DDEV_ADDON}
ddev restart >/dev/null
health_checks
}
Loading