# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           python 1.0
PortGroup           github 1.0

name                py-cfn-lint
github.setup        aws-cloudformation cfn-python-lint 1.18.2 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0

platforms           {darwin any}
supported_archs     noarch
license             MIT
maintainers         {judaew @judaew} openmaintainer

description         Checks cloudformation for practices and behaviour that \
                    could potentially be improved
long_description    {*}${description}

checksums           sha256  97fa5160ff954122f70bfbdd26d50973de1209163842a3c37b6c45e76497a3d5 \
                    rmd160  b418c51f770352b52607110841dd9058f287b2c9 \
                    size    3072337

python.versions     310 311

if {${name} ne ${subport}} {
    post-patch {
        reinplace "s|\'cfn-lint\'|\'cfn-lint-${python.branch}\'|g" \
            ${worksrcpath}/test/integration/__init__.py
    }

    depends_run-append \
                    port:py${python.version}-yaml \
                    port:py${python.version}-aws-sam-translator \
                    port:py${python.version}-jsonpatch \
                    port:py${python.version}-jsonschema \
                    port:py${python.version}-networkx \
                    port:py${python.version}-junit-xml \
                    port:py${python.version}-jschema_to_python \
                    port:py${python.version}-sarif-om \
                    port:py${python.version}-sympy \
                    port:py${python.version}-regex

    depends_test-append \
                    port:py${python.version}-mock

    test.run        yes
}

github.livecheck.regex  {([0-9.]+)}
