Skip to content

feat: add update-checker.sh #76

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stasadev
Copy link
Member

The Issue

We should have a way to determine if an add-on is outdated.

This PR depends on #75 (for README_ADDON.md upstream example).

How This PR Solves The Issue

TODOs:

  • Create update-checker.sh
  • Look through the existing checks, add new ones if necessary.
  • Decide how to use it, maybe it should run in a separate workflow file? (An upstream file should always be used here)

Manual Testing Instructions

Run this in some add-on directory:

curl -fsSL https://raw.githubusercontent.com/ddev/ddev-addon-template/20250430_stasadev_update_checker/.github/scripts/update-checker.sh | bash

Automated Testing Overview

Release/Deployment Notes

@rfay
Copy link
Member

rfay commented May 2, 2025

I tried it out on rfay/ddev-php-patch-build and it gave me useful information:

ERROR: Actions needed:
- README.md should not contain 'project is maintained' badge, see upstream file https://github.com/ddev/ddev-addon-template/blob/main/README_ADDON.md?plain=1
- README.md should contain badge: add-on registry, see upstream file https://github.com/ddev/ddev-addon-template/blob/main/README_ADDON.md?plain=1
- README.md should contain badge: last commit, see upstream file https://github.com/ddev/ddev-addon-template/blob/main/README_ADDON.md?plain=1
- README.md should contain badge: release, see upstream file https://github.com/ddev/ddev-addon-template/blob/main/README_ADDON.md?plain=1
- install.yaml should contain 'ddev_version_constraint: ">= v1.24.3"', see upstream file https://github.com/ddev/ddev-addon-template/blob/main/install.yaml
- GitHub template missing: .github/ISSUE_TEMPLATE/bug_report.yml, see upstream file https://github.com/ddev/ddev-addon-template/blob/main/.github/ISSUE_TEMPLATE/bug_report.yml?plain=1
- GitHub template missing: .github/ISSUE_TEMPLATE/feature_request.yml, see upstream file https://github.com/ddev/ddev-addon-template/blob/main/.github/ISSUE_TEMPLATE/feature_request.yml?plain=1
- GitHub template missing: .github/PULL_REQUEST_TEMPLATE.md, see upstream file https://github.com/ddev/ddev-addon-template/blob/main/.github/PULL_REQUEST_TEMPLATE.md?plain=1

@stasadev stasadev force-pushed the 20250430_stasadev_update_checker branch from 7157f01 to 5dadcbe Compare May 7, 2025 17:24
@stasadev
Copy link
Member Author

stasadev commented May 7, 2025

TODO:

  • add check for #!/bin/bash > #!/usr/bin/env bash
  • check that .github/workflows/tests.yml uses ddev/github-action-add-on-test@v2

@tyler36
Copy link
Collaborator

tyler36 commented May 8, 2025

This is a great idea!

I was playing around with a local addon and got:

- Remove unnecessary file: README_DEBUG.md

Wondering why we are removing debugging information. It's important this is documented somewhere, so where is ideal?

@rfay
Copy link
Member

rfay commented May 8, 2025

Wondering why we are removing debugging information. It's important this is documented somewhere, so where is ideal?

The documentation belongs in the template (or DDEV docs, or ddev.com) not in the add-on where it just gets stale rather fast.

@rfay rfay added this to Next TODOs May 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

3 participants