summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--.gitignore24
-rw-r--r--PKGBUILD18
-rw-r--r--update.sh23
4 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8a781dbe10aa
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = cloud-nuke-bin
+ pkgdesc = A tool for cleaning up your cloud accounts by nuking (deleting) all resources within it.
+ pkgver = 0.1.25
+ pkgrel = 1
+ url = https://github.com/gruntwork-io/cloud-nuke
+ arch = x86_64
+ arch = i386
+ license = MIT
+ provides = cloud-nuke
+ source_x86_64 = https://github.com/gruntwork-io/cloud-nuke/releases/download/v0.1.25/cloud-nuke_linux_amd64
+ sha256sums_x86_64 = 7167f9993977f64d15eec0d695b3fcd5a523fe3033258bc04392bc0c0155e0c2
+ source_i386 = https://github.com/gruntwork-io/cloud-nuke/releases/download/v0.1.25/cloud-nuke_linux_386
+ sha256sums_i386 = 8f10fcea12f4d2d03a94d8472e6ad1b11521a6ba0f0b71e0ac42f4b08d4ac2e7
+
+pkgname = cloud-nuke-bin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..08be479cf211
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,24 @@
+
+# Created by https://www.toptal.com/developers/gitignore/api/archlinuxpackages
+# Edit at https://www.toptal.com/developers/gitignore?templates=archlinuxpackages
+
+### ArchLinuxPackages ###
+*.tar
+*.tar.*
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+pkg/
+src/
+
+# End of https://www.toptal.com/developers/gitignore/api/archlinuxpackages
+
+SHA256SUMS*
+
+cloud-nuke*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..734c47f8dd6b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,18 @@
+# Maintainer: Thiago Almeida <echo "dGhpYWdvYWxtZWlkYXNhQGdtYWlsLmNvbQo=" | base64 -d>
+
+pkgname="cloud-nuke-bin"
+pkgver=0.1.25
+pkgrel=1
+pkgdesc="A tool for cleaning up your cloud accounts by nuking (deleting) all resources within it."
+url="https://github.com/gruntwork-io/cloud-nuke"
+arch=('x86_64' 'i386')
+license=('MIT')
+provides=('cloud-nuke')
+source_x86_64=("$pkgname::$url/releases/download/v${pkgver}/${pkgname/-bin/}_linux_amd64")
+source_i386=("$pkgname::$url/releases/download/v${pkgver}/${pkgname/-bin/}_linux_386")
+sha256sums_x86_64=(7167f9993977f64d15eec0d695b3fcd5a523fe3033258bc04392bc0c0155e0c2)
+sha256sums_i386=(8f10fcea12f4d2d03a94d8472e6ad1b11521a6ba0f0b71e0ac42f4b08d4ac2e7)
+
+package() {
+ install -Dm755 cloud-nuke-bin "$pkgdir/usr/bin/cloud-nuke"
+}
diff --git a/update.sh b/update.sh
new file mode 100644
index 000000000000..7e09cb841bf4
--- /dev/null
+++ b/update.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -x
+
+set -eou pipefail
+
+
+http https://api.github.com/repos/gruntwork-io/cloud-nuke/releases/latest \
+ "Accept: application/vnd.github.v3+json" |
+ jq -r '.assets[] | select(.name | test("^(SHA256SUMS|cloud-nuke.*_linux_(amd64|386))$")) | .browser_download_url' |
+ xargs -n 1 -P 3 wget
+
+sha256sum --ignore-missing --status -c SHA256SUMS
+
+X86_64_SHA=$(awk '/cloud-nuke.*_linux_amd64$/ {print $1}' SHA256SUMS)
+
+I386_SHA=$(awk '/cloud-nuke.*_linux_386$/ {print $1}' SHA256SUMS)
+
+sed -i -r 's/(sha256sums_x86_64=)\([A-Fa-f0-9]*\)/\1\('"$X86_64_SHA"'\)/g' PKGBUILD
+
+sed -i -r 's/(sha256sums_i386=)\([A-Fa-f0-9]*\)/\1\('"$I386_SHA"'\)/g' PKGBUILD
+
+makepkg --printsrcinfo >.SRCINFO