From ced4b94b1b2761f140c6ebaf30bea63d9aa6604e Mon Sep 17 00:00:00 2001 From: Andrew <51118083+ArionThinker@users.noreply.github.com> Date: Fri, 15 Mar 2024 21:24:53 +0200 Subject: [PATCH] +github.com/versent/saml2aws (#5614) * new file: projects/github.com/Versent/saml2aws/package.yml * modified: projects/github.com/Versent/saml2aws/package.yml --- .../github.com/Versent/saml2aws/package.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 projects/github.com/Versent/saml2aws/package.yml diff --git a/projects/github.com/Versent/saml2aws/package.yml b/projects/github.com/Versent/saml2aws/package.yml new file mode 100644 index 00000000..3591fa75 --- /dev/null +++ b/projects/github.com/Versent/saml2aws/package.yml @@ -0,0 +1,47 @@ +distributable: + url: https://github.com/Versent/saml2aws/archive/refs/tags/{{version.tag}}.tar.gz + strip-components: 1 + +versions: + github: Versent/saml2aws + +display-name: saml2aws + +build: + dependencies: + go.dev: ^1.21 + script: + go build $ARGS -ldflags="$LDFLAGS" ./cmd/saml2aws + env: + ARGS: + - -trimpath + - -o={{prefix}}/bin/saml2aws + LDFLAGS: + - -s + - -w + - -X main.Version={{version}} + linux: + LDFLAGS: + - -buildmode=pie + +provides: + - bin/saml2aws + +test: + - saml2aws --help + - saml2aws --version 2>&1 | grep {{version}} + - run: cp $FIXTURE ./_saml2aws + fixture: | + #compdef saml2aws + + _saml2aws_bash_autocomplete() { + local cur prev opts base + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + opts=$( ${COMP_WORDS[0]} --completion-bash ${COMP_WORDS[@]:1:$COMP_CWORD} ) + COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) + return 0 + } + complete -F _saml2aws_bash_autocomplete saml2aws + - saml2aws script 2>out.log || true + - cat out.log | grep 'Failed to validate account'