From bedb779e4dc1fc459d84e68d373ed705bd874b69 Mon Sep 17 00:00:00 2001 From: Nico Esteves Date: Wed, 3 Apr 2019 15:39:04 +0200 Subject: [PATCH] v7.3.0 release --- CHANGELOG.md | 6 ++++++ VERSION | 2 +- scripts/build.sh | 20 ++++++++++++++------ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d02b290..22413bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v7.3.0 (27/03/2018) + +**New** + +* `iam-sync-users`: Manage sudo with IAM tags + ## v7.2.0 (26/03/2018) **New** diff --git a/VERSION b/VERSION index 0ee843c..1502020 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -7.2.0 +7.3.0 diff --git a/scripts/build.sh b/scripts/build.sh index 878d6e1..587a7fe 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -11,6 +11,7 @@ rm -f ${sums_file}* version=$(cat ${base}/VERSION) commit=$(git rev-parse --short HEAD) +mac_supported="iam-session kms-env aws-dump ecr-get-login ec2-describe-instances ec2-ip-from-name" echo "Building ${version} (${commit})" find ${base} -name "main.go" | while read src; do @@ -21,16 +22,23 @@ find ${base} -name "main.go" | while read src; do fi fi - name=bin/$(echo ${src} | awk -F/ '{print $1"-"$2}') + fname=$(echo ${src} | awk -F/ '{print $1"-"$2}') + name=bin/${fname} echo " ${name}" folder=`dirname ${src}` if [ ! -f ${folder}/Makefile ]; then - CGO_ENABLED=0 go build -installsuffix cgo -o ${base}/${name} -ldflags="-s -w -X github.com/hamstah/awstools/common.Version=${version} -X github.com/hamstah/awstools/common.CommitHash=${commit}" ${folder}/*.go - gpg --armor --detach-sig ${base}/${name} + CGO_ENABLED=0 go build -installsuffix cgo -o ${base}/${name} -ldflags="-s -w -X github.com/hamstah/awstools/common.Version=${version} -X github.com/hamstah/awstools/common.CommitHash=${commit}" ${folder}/*.go + gpg --armor --detach-sig ${base}/${name} + + if [[ ${mac_supported} =~ ${fname} ]]; then + GOOS=darwin CGO_ENABLED=0 go build -installsuffix cgo -o ${base}/${name}_darwin -ldflags="-s -w -X github.com/hamstah/awstools/common.Version=${version} -X github.com/hamstah/awstools/common.CommitHash=${commit}" ${folder}/*.go + gpg --armor --detach-sig ${base}/${name}_darwin + fi + else - cd ${folder} - make - cd - + cd ${folder} + make + cd - fi done