From bbc73ecf2433d92e21ff77794baedc79b3f61739 Mon Sep 17 00:00:00 2001 From: Siddharth Date: Fri, 2 Feb 2024 10:34:51 +0530 Subject: [PATCH] ci: remove windows build and choco (#232) --- ci/pipeline.yml | 47 ------------------------ ci/tasks/build-release.sh | 6 +-- ci/tasks/prep-github-release.sh | 1 - ci/tasks/publish-to-choco.sh | 15 -------- ci/values.yml | 1 - dist/choco/galoy-cli.nuspec | 19 ---------- dist/choco/tools/chocolateyinstall.ps1 | 29 --------------- dist/choco/tools/chocolateyuninstall.ps1 | 4 -- 8 files changed, 1 insertion(+), 121 deletions(-) delete mode 100755 ci/tasks/publish-to-choco.sh delete mode 100644 dist/choco/galoy-cli.nuspec delete mode 100644 dist/choco/tools/chocolateyinstall.ps1 delete mode 100644 dist/choco/tools/chocolateyuninstall.ps1 diff --git a/ci/pipeline.yml b/ci/pipeline.yml index 0f1f540..65ef554 100644 --- a/ci/pipeline.yml +++ b/ci/pipeline.yml @@ -24,7 +24,6 @@ groups: - check-code - release - publish-to-crates - - publish-to-choco - set-dev-version jobs: @@ -66,30 +65,6 @@ jobs: run: path: pipeline-tasks/ci/tasks/update-repo.sh - in_parallel: - - task: build-windows-release - privileged: true - config: - platform: linux - image_resource: - type: registry-image - source: - username: #@ data.values.docker_registry_user - password: #@ data.values.docker_registry_password - repository: #@ data.values.docker_registry + "/wincross-rust" - inputs: - - name: version - - name: pipeline-tasks - - name: repo - outputs: - - name: x86_64-pc-windows-gnu - caches: - - path: cargo-home - - path: cargo-target-dir - params: - TARGET: x86_64-pc-windows-gnu - OUT: x86_64-pc-windows-gnu - run: - path: pipeline-tasks/ci/tasks/build-release.sh - task: build-osx-release privileged: true config: @@ -140,7 +115,6 @@ jobs: image_resource: #@ release_task_image_config() platform: linux inputs: - - name: x86_64-pc-windows-gnu - name: x86_64-apple-darwin - name: x86_64-unknown-linux-musl - name: version @@ -187,27 +161,6 @@ jobs: run: path: pipeline-tasks/ci/tasks/publish-to-crates.sh -- name: publish-to-choco - plan: - - in_parallel: - - { get: repo, passed: [release], trigger: true } - - get: pipeline-tasks - - get: version - - task: publish-to-choco - config: - image_resource: - type: registry-image - source: { repository: chocolatey/choco, tag: latest } - platform: linux - inputs: - - name: version - - name: pipeline-tasks - - name: repo - params: - CHOCO_API_TOKEN: #@ data.values.choco_api_token - run: - path: pipeline-tasks/ci/tasks/publish-to-choco.sh - - name: set-dev-version plan: - in_parallel: diff --git a/ci/tasks/build-release.sh b/ci/tasks/build-release.sh index aad00a3..f9df4db 100755 --- a/ci/tasks/build-release.sh +++ b/ci/tasks/build-release.sh @@ -28,11 +28,7 @@ OUT_DIR="${BINARY}-${TARGET}-${VERSION}" rm -rf "${OUT_DIR}" || true mkdir "${OUT_DIR}" -if [[ $TARGET == "x86_64-pc-windows-gnu" ]]; then - mv ./${BINARY}.exe ${OUT_DIR} -else - mv ./${BINARY} ${OUT_DIR} -fi +mv ./${BINARY} ${OUT_DIR} tar -czvf ${OUT_DIR}.tar.gz ${OUT_DIR} diff --git a/ci/tasks/prep-github-release.sh b/ci/tasks/prep-github-release.sh index 8114a11..85d7a72 100755 --- a/ci/tasks/prep-github-release.sh +++ b/ci/tasks/prep-github-release.sh @@ -4,7 +4,6 @@ set -eu mkdir artifacts/binaries -mv x86_64-pc-windows-gnu/* artifacts/binaries mv x86_64-apple-darwin/* artifacts/binaries mv x86_64-unknown-linux-musl/* artifacts/binaries diff --git a/ci/tasks/publish-to-choco.sh b/ci/tasks/publish-to-choco.sh deleted file mode 100755 index 8e0dc83..0000000 --- a/ci/tasks/publish-to-choco.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash - -set -eu - -export VERSION=$(cat version/version) -export CHECKSUM=$(curl -L https://github.com/GaloyMoney/galoy-cli/releases/download/${VERSION}/sha256sums.txt | grep galoy-cli-x86_64-pc-windows-gnu | cut -d' ' -f1) - -pushd repo/dist/choco - -sed -i "7s/.*<\/version>/${VERSION}<\/version>/" galoy-cli.nuspec -sed -i "3s/\$version=.*/\$version='${VERSION}'/" tools/chocolateyinstall.ps1 -sed -i "4s/\$checksum=.*/\$checksum='${CHECKSUM}'/" tools/chocolateyinstall.ps1 - -choco apikey --key ${CHOCO_API_KEY} --source https://push.chocolatey.org/ -choco push galoy-cli.${VERSION}.nupkg --source https://push.chocolatey.org/ diff --git a/ci/values.yml b/ci/values.yml index f911916..d898d9e 100644 --- a/ci/values.yml +++ b/ci/values.yml @@ -15,7 +15,6 @@ gh_org: GaloyMoney gh_repository: galoy-cli crates_api_token: ((crates.token)) -choco_api_token: ((chocolatey.token)) slack_channel: galoy-cli-github slack_username: concourse diff --git a/dist/choco/galoy-cli.nuspec b/dist/choco/galoy-cli.nuspec deleted file mode 100644 index 38828b5..0000000 --- a/dist/choco/galoy-cli.nuspec +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - galoy-cli - 0.1.4 - Galoy CLI - Galoy - Galoy - https://github.com/GaloyMoney/galoy-cli/blob/main/LICENSE - https://github.com/GaloyMoney/galoy-cli - https://galoy.io/wp-content/uploads/2021/07/Galoy-Current-Logo-Blue.svg - false - A CLI Client for interacting with Galoy Backend. - Copyright 2023 - CLI galoy - - diff --git a/dist/choco/tools/chocolateyinstall.ps1 b/dist/choco/tools/chocolateyinstall.ps1 deleted file mode 100644 index 9098aad..0000000 --- a/dist/choco/tools/chocolateyinstall.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -$ErrorActionPreference = 'Stop' - -$version='0.1.4' -$checksum = '73771aa07ff0170e4ca06e4df0d76605a8ea5517e3ac077526bc5df6e3ebb336' - -$url = "https://github.com/GaloyMoney/galoy-cli/releases/download/$version/galoy-cli-x86_64-pc-windows-gnu-$version.tar.gz" - -$packageName = 'galoy-cli' -$installDir = "${env:ChocolateyInstall}\lib\$packageName" -$binDir = "${env:ChocolateyInstall}\bin" - -$packageArgs = @{ - packageName = $packageName - fileFullPath = "$installDir\$packageName.tar.gz" - url = $url - checksum = $checksum - checksumType = 'sha256' -} - -Get-ChocolateyWebFile @packageArgs - -# Unpack the .tar.gz file -Get-ChocolateyUnzip -FileFullPath "$installDir\$packageName.tar.gz" -Destination $installDir -Get-ChocolateyUnzip -FileFullPath "$installDir\$packageName.tar" -Destination $installDir - -# Move the executable to the bin directory -Move-Item -Path "$installDir\galoy-cli-x86_64-pc-windows-gnu-$version\$packageName.exe" -Destination "$binDir\$packageName.exe" - -Install-ChocolateyPath -PathToInstall $binDir -PathType 'Machine' diff --git a/dist/choco/tools/chocolateyuninstall.ps1 b/dist/choco/tools/chocolateyuninstall.ps1 deleted file mode 100644 index 785a8ef..0000000 --- a/dist/choco/tools/chocolateyuninstall.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -$packageName = 'galoy-cli' -$installDir = "${env:ChocolateyInstall}\bin" - -Remove-Item "$installDir\$packageName.exe" -Force -ErrorAction SilentlyContinue