# -*- 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           github 1.0

github.setup        GoogleContainerTools skaffold 2.16.1 v
revision            0

categories          devel
maintainers         {breun.nl:nils @breun} openmaintainer
platforms           darwin
license             Apache-2

description         Skaffold is a command line tool that facilitates continuous development for Kubernetes applications

long_description    Skaffold is a command line tool that facilitates continuous development for Kubernetes applications. \
                    You can iterate on your application source code locally then deploy to local or remote Kubernetes clusters. \
                    Skaffold handles the workflow for building, pushing and deploying your application. \
                    It also provides building blocks and describe customizations for a CI/CD pipeline.

homepage            https://skaffold.dev

github.tarball_from archive

checksums           rmd160  8f85c1108fc27c3b042a9d3ff871c62ff56820e1 \
                    sha256  ec40b593ffadfe8fcb96085d76db6638f56aebc2767e76046c4237bb925e6678 \
                    size    64031398

depends_build       port:go

use_configure       no

build.env-append    VERSION=${version} LOCAL=true
build.target

test.run    yes
test.cmd    out/${name}
test.target
test.args   version

destroot {
    xinstall -m 0755 ${worksrcpath}/out/${name} ${destroot}${prefix}/bin/${name}

    # bash completion
    xinstall -d ${destroot}${prefix}/etc/bash_completion.d
    system "${destroot}${prefix}/bin/${name} completion bash > ${destroot}${prefix}/etc/bash_completion.d/${name}"

    # zsh completion
    xinstall -d ${destroot}${prefix}/share/zsh/site-functions
    system "${destroot}${prefix}/bin/${name} completion zsh > ${destroot}${prefix}/share/zsh/site-functions/_${name}"
}

# Disable update check: https://skaffold.dev/docs/references/privacy/#update-check
notes "
To disable automatic update checks, you have two options:

  1. set the SKAFFOLD_UPDATE_CHECK environment variable to false, e.g. in your shell profile:

     export SKAFFOLD_UPDATE_CHECK=false

  2. turn it off in skaffold’s config (~/.skaffold/config) with:

     skaffold config set -g update-check false
"
