From 058cd4bdebffe97810bd6ae7d61c9c794703314a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Erik=20Hedenstr=C3=B6m?= <erik@hedenstroem.com> Date: Fri, 4 Feb 2022 18:22:40 +0100 Subject: [PATCH] Tweaking file extensions --- .gitlab-ci.yml | 30 +++++++++++++++++++++--------- README.md | 9 +++++---- 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5d1e1df..17dc9fd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,8 +17,10 @@ stages: - .cache script: - go generate constant/version.go - - GOOS=${CI_JOB_NAME%%-*} GOARCH=${CI_JOB_NAME#*-} CGO_ENABLED=0 go build -tags netgo -ldflags '-s -w -extldflags "-static"' -o $CI_PROJECT_NAME-$CI_JOB_NAME - - ./upx -q --brute $CI_PROJECT_NAME-$CI_JOB_NAME + - CI_JOB_ARR=(${CI_JOB_NAME//-/ }) + - echo ${CI_JOB_ARR[0]} ${CI_JOB_ARR[1]} ${CI_JOB_ARR[2]} $CI_PROJECT_NAME-${CI_JOB_ARR[0]}-${CI_JOB_ARR[2]} + - GOOS=${CI_JOB_ARR[0]} GOARCH=${CI_JOB_ARR[1]} CGO_ENABLED=0 go build -tags netgo -ldflags '-s -w -extldflags "-static"' -o $CI_PROJECT_NAME-${CI_JOB_ARR[0]}-${CI_JOB_ARR[2]} + - ./upx -q --brute $CI_PROJECT_NAME-${CI_JOB_ARR[0]}-${CI_JOB_ARR[2]} artifacts: name: "$CI_PROJECT_NAME-$CI_JOB_NAME" paths: @@ -35,10 +37,20 @@ version.txt: paths: - $CI_PROJECT_NAME-version.txt -"darwin-arm64": *build -"darwin-amd64": *build -"linux-arm": *build -"linux-386": *build -"linux-amd64": *build -"windows-386": *build -"windows-amd64": *build +upload to s3: + image: amazon/aws-cli + stage: upload + only: + - /^\d+[.]\d+[.]\d+$/ + script: + - aws s3 cp . s3://s3.hedenstroem.com/utils/$CI_PROJECT_NAME/ --recursive --exclude="*" --include="$CI_PROJECT_NAME-*" + - aws configure set preview.cloudfront true + - aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_DISTRIBUTION_ID --paths "/utils/$CI_PROJECT_NAME/*" + +"darwin-arm64-arm64": *build +"darwin-amd64-amd64": *build +"linux-arm-arm": *build +"linux-386-i386": *build +"linux-amd64-amd64": *build +"windows-386-i386.exe": *build +"windows-amd64-x64.exe": *build diff --git a/README.md b/README.md index c53d4ba..0845390 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,17 @@ -# Vault Environment Tool +# UDM Query -A small utility to export data from vault as environment variables or download as files. +A tool to query Ubiquiti UniFi Dream Machines ## Installation You can download one of the pre-compiled binaries from the list below. -- [Mac](http://s3.hedenstroem.com/utils/udm-query/udm-query-darwin) +- [Mac (Intel)](http://s3.hedenstroem.com/utils/udm-query/udm-query-darwin-amd64) +- [Mac (Apple Silicon)](http://s3.hedenstroem.com/utils/udm-query/udm-query-darwin-arm64) - [Linux (ARM)](http://s3.hedenstroem.com/utils/udm-query/udm-query-linux-arm) - [Linux (32-bit)](http://s3.hedenstroem.com/utils/udm-query/udm-query-linux-i386) - [Linux (64-bit)](http://s3.hedenstroem.com/utils/udm-query/udm-query-linux-amd64) -- [Windows (32-bit)](http://s3.hedenstroem.com/utils/udm-query/udm-query-windows.exe) +- [Windows (32-bit)](http://s3.hedenstroem.com/utils/udm-query/udm-query-windows-i386.exe) - [Windows (64-bit)](http://s3.hedenstroem.com/utils/udm-query/udm-query-windows-x64.exe) ## Usage -- GitLab