From 0195903a7e800b0d1d85ee05e66d6232ff3e72d8 Mon Sep 17 00:00:00 2001 From: Matteo Pologruto Date: Thu, 17 Nov 2022 12:21:21 +0100 Subject: [PATCH] Remove deploy.sh --- deploy.sh | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) delete mode 100755 deploy.sh diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index 1d8518e..0000000 --- a/deploy.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -xe -GIT_REV="$(git log --pretty=format:'%h' -n 1)" -BUILD_DATE="$(date +%Y-%m-%d:%H:%M:%S)" -COMPILEINFO="$(echo "+${GIT_REV}+${BUILD_DATE}" | tr -d '"')" - -VERSION="$(grep "const AppVersion" main.go | cut -f4 -d " " | tr -d '"')" - -#Remember to set GOROOT accordingly with your installation - -export GOPATH=$PWD -export CGO_ENABLED=false - -rm -rf distrib/ - -declare -a target_folders=("linux_amd64" "linux_386" "linux_arm" "darwin_amd64" "windows_386" "linux_arm64") - -mkdir distrib - -for folder in "${target_folders[@]}"; do - - IFS=_ read -r -a fields <<<"$folder" - mkdir -p "distrib/${folder}/bin/" - GOOS="${fields[0]}" GOARCH="${fields[1]}" go build -o "distrib/${folder}/bin/arduinoOTA" -ldflags "-X main.compileInfo=$COMPILEINFO" main.go -done - -#Fix windows binary extension -mv distrib/windows_386/bin/arduinoOTA distrib/windows_386/bin/arduinoOTA.exe - -cd distrib - -for folder in "${target_folders[@]}"; do - mv "$folder" arduinoOTA - if [[ $folder == "windows_386" ]]; then - zip -r "arduinoOTA-${VERSION}-${folder}.zip" arduinoOTA/ - else - tar cjf "arduinoOTA-${VERSION}-${folder}.tar.bz2" arduinoOTA/ - fi - rm -rf arduinoOTA -done - -echo ======= -ls -la arduinoOTA* -echo ======= -sha256sum arduinoOTA* -echo ======= -shasum arduinoOTA*