# -*- 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.11.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  7e07e42d9e88e819a80edfaa2ddf821d1a442227 \
                    sha256  2b0d7e3bf6b0f744ba5214b8f8d8429a207a3bfb03bf3d975dda0039813e052c \
                    size    61134098

depends_build       port:go

use_configure       no

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

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
"
