Skip to content

Commit adf9599

Browse files
authored
feat: short link for update checker, use better version check (#82)
1 parent 8f6a0ba commit adf9599

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/scripts/update-checker.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ check_install_yaml() {
5555

5656
if [[ -f "$install_yaml" ]]; then
5757
# Check for ddev_version_constraint
58-
if ! grep -q "ddev_version_constraint: '>= v1.24.3'" "$install_yaml"; then
59-
actions+=("install.yaml should contain 'ddev_version_constraint: \">= v1.24.3\"', see upstream file $UPSTREAM/$install_yaml")
58+
if ! grep -q "^ddev_version_constraint: '>= v1\.24\.[3-9][0-9]*'" "$install_yaml" && ! grep -q "^ddev_version_constraint: '>= v1\.2[5-9]\." "$install_yaml"; then
59+
actions+=("install.yaml should contain 'ddev_version_constraint: \">= v1.24.3\"' or higher, see upstream file $UPSTREAM/$install_yaml")
6060
fi
6161

6262
# Check for addon-template
@@ -104,7 +104,7 @@ check_shebang() {
104104
# Check .github/workflows/tests.yml for required conditions
105105
check_tests_workflow() {
106106
local tests_yml=".github/workflows/tests.yml"
107-
107+
108108
if [[ -f "$tests_yml" ]]; then
109109
# Check for ddev/github-action-add-on-test@v2
110110
if ! grep -q "ddev/github-action-add-on-test@v2" "$tests_yml"; then

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# DDEV Add-on Template <!-- omit in toc -->
77

88
* [What is DDEV Add-on Template?](#what-is-ddev-add-on-template)
9+
* [Update Checker](#update-checker)
910
* [TL;DR](#tldr)
1011
* [Components of the repository](#components-of-the-repository)
1112
* [Getting started](#getting-started)
@@ -23,6 +24,14 @@ This repository is a quick way to get started. You can create a new repo from th
2324

2425
![template button](images/template-button.png)
2526

27+
## Update Checker
28+
29+
Run the update checker script periodically in your add-on to verify it is up to date:
30+
31+
```bash
32+
curl -fsSL https://ddev.com/s/addon-update-checker.sh | bash
33+
```
34+
2635
## TL;DR
2736

2837
1. Click the green `Use this template button` (top right) > `Create a new repository`.
@@ -40,13 +49,6 @@ This repository is a quick way to get started. You can create a new repo from th
4049
9. Create a new [release](https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository).
4150
10. When ready to share, make your add-on discoverable by adding the `ddev-get` [topic](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/classifying-your-repository-with-topics).
4251

43-
> [!TIP]
44-
> Run the `update-checker.sh` in your add-on to ensure it is up to date:
45-
>
46-
> ```bash
47-
> curl -fsSL https://raw.githubusercontent.com/ddev/ddev-addon-template/main/.github/scripts/update-checker.sh | bash
48-
> ```
49-
5052
## Components of the repository
5153

5254
* The fundamental contents of the add-on service or other component. For example, in this template there is a [docker-compose.addon-template.yaml](docker-compose.addon-template.yaml) file.

0 commit comments

Comments
 (0)