From 6529c9478eb0c26d5e96a199dd8f26965625f4b6 Mon Sep 17 00:00:00 2001 From: Matty Jones Date: Thu, 6 Aug 2020 22:50:15 -0400 Subject: [PATCH] remove shell scripts --- build.sh | 60 ------------------------------------------------------ release.sh | 32 ----------------------------- 2 files changed, 92 deletions(-) delete mode 100755 build.sh delete mode 100755 release.sh diff --git a/build.sh b/build.sh deleted file mode 100755 index b202827..0000000 --- a/build.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env bash - -readonly BUILD_FOLDER=build -readonly VERSION=$(cat core/banner.go | grep Version | cut -d '"' -f 2) - -bin_dep() { - BIN=$1 - which $BIN > /dev/null || { echo "[-] Dependency $BIN not found !"; exit 1; } -} - -create_exe_archive() { - bin_dep 'zip' - - OUTPUT="$1" - - echo "[*] Creating archive $OUTPUT ..." - zip -j "$OUTPUT" gitrob.exe ../README.md ../LICENSE.txt > /dev/null - rm -rf gitrob gitrob.exe -} - -create_archive() { - bin_dep 'zip' - - OUTPUT="$1" - - echo "[*] Creating archive $OUTPUT ..." - zip -j "$OUTPUT" gitrob ../README.md ../LICENSE.md > /dev/null - rm -rf gitrob gitrob.exe -} - -build_linux_amd64() { - echo "[*] Building linux/amd64 ..." - GOOS=linux GOARCH=amd64 go build -o gitrob .. -} - -build_macos_amd64() { - echo "[*] Building darwin/amd64 ..." - GOOS=darwin GOARCH=amd64 go build -o gitrob .. -} - -build_windows_amd64() { - echo "[*] Building windows/amd64 ..." - GOOS=windows GOARCH=amd64 go build -o gitrob.exe .. -} - -rm -rf "$BUILD_FOLDER" -mkdir "$BUILD_FOLDER" -cd "$BUILD_FOLDER" - -build_linux_amd64 && create_archive "gitrob_linux_amd64_$VERSION.zip" -build_macos_amd64 && create_archive "gitrob_macos_amd64_$VERSION.zip" -build_windows_amd64 && create_exe_archive "gitrob_windows_amd64_$VERSION.zip" -shasum -a 256 * > checksums.txt - -echo -echo -du -sh * - -cd -- - diff --git a/release.sh b/release.sh deleted file mode 100755 index fae0ee4..0000000 --- a/release.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -readonly CURRENT_VERSION=$(cat core/banner.go | grep Version | cut -d '"' -f 2) -declare -a TO_UPDATE=( - core/banner.go -) - -read -p "[?] Did you remember to update CHANGELOG.md? " -read -p "[?] Did you remember to update README.md with new features/changes? " - -echo -n "[*] Current version is $CURRENT_VERSION. Enter new version: " -read NEW_VERSION -echo "[*] Pushing and tagging version $NEW_VERSION in 5 seconds..." -sleep 5 - -for file in "${TO_UPDATE[@]}" -do - echo "[*] Patching $file ..." - sed -i "s/$CURRENT_VERSION/$NEW_VERSION/g" $file - git add $file -done - -git commit -m "Releasing $NEW_VERSION" -git push - -git tag -a $NEW_VERSION -m "Release $NEW_VERSION" -git push origin $NEW_VERSION - -echo -echo "[*] All done, $NEW_VERSION released." - -