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

go.setup            github.com/alex067/tfstate 1.0.0
go.package          alex067/tfstate
revision            0

description         \
    A wrapper around terraform state commands to provide guard rails

long_description    \
    ${name} is a wrapper around Terraform state commands which alter the \
    state file, such as \`terraform state mv\` and \`terraform state rm\`. \
    ${name} automatically generates a backup inside \
    \`.terraform/tfstate/\*\`, allowing for easy rollback if a mistake was \
    made. This is possible due to the wrapper, by first performming a backup \
    of the current state file, then running \`tfstate rollback --latest\`. \
    ${name} adds a manual confirmation step, which also lists the possible \
    resources affected by the requested state command.

categories          sysutils
installs_libs       no
license             MIT
maintainers         {gmail.com:herby.gillot @herbygillot} \
                    openmaintainer

build.pre_args-append \
    -ldflags \"-X main.version=${version}\"

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

checksums           ${distname}${extract.suffix} \
                        rmd160  6e1725ac152e9481bfd8ed82c53026c109df5603 \
                        sha256  e546da08bf48cee992addf8fc34ad073939322aedeeec9a22645187497114da5 \
                        size    7375

go.vendors          golang.org/x/sys \
                        lock    0f9fa26af87c \
                        rmd160  b5e5b546cddec0ad97bccbc3a19fe3630792097b \
                        sha256  e9ff4a07a3cc01341990da0d8ecd1cfa05643a2db423bb1efcf62f577901ea77 \
                        size    1202158 \
                    github.com/spf13/pflag \
                        lock    v1.0.5 \
                        rmd160  2ce81608a38c6f383a35bccd24d64361df5828c9 \
                        sha256  7f41acdcba65b1fab5b9b633947a139f9915b60f94bdab486cdbe9d90c54f61e \
                        size    50815 \
                    github.com/spf13/cobra \
                        lock    v1.6.1 \
                        rmd160  e7d60f9ffc63828e5e51446e550f3342d629928f \
                        sha256  1bd0924138d5f2fc0b2187a4331af53dd65ad313b8c84bcea9345e42c29c08fb \
                        size    111079 \
                    github.com/mattn/go-isatty \
                        lock    v0.0.14 \
                        rmd160  8ebfd3a6f2898a729e41dff6b5359e88959c46e1 \
                        sha256  dc141c207a7f4eb83992df90ca087841a0a3aab5a4f2b528bf81d42a186bcc1e \
                        size    4705 \
                    github.com/mattn/go-colorable \
                        lock    v0.1.9 \
                        rmd160  26adcb271ae6a131102a528c7d841706aa36fa68 \
                        sha256  7b84fcab71630f887df9ac09d8e68c7d6356cc3bb031aea73f49680de0cc329f \
                        size    9584 \
                    github.com/inconshreveable/mousetrap \
                        lock    v1.1.0 \
                        rmd160  88f9577df93ac0f8801d8960adc7f28e38867f3e \
                        sha256  f69af10ff08c0e87f92dac3ee5172d8ed02463725b74edfc8943ef018a1a632d \
                        size    5343 \
                    github.com/fatih/color \
                        lock    v1.13.0 \
                        rmd160  0c56533948a292eb8c5181e9a88a45fbd1267bf5 \
                        sha256  a65b114bfe507384e1660730803ffb4437c63a24dd11a5d7f61c77f048caa55f \
                        size    10828
