aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorCh4s3r2023-01-30 20:53:48 +0100
committerCh4s3r2023-01-30 20:56:09 +0100
commit1523c2b5fd445c7d0f09279d79aec524cfbbfde5 (patch)
tree5be4ed2dd9b921a7378b60edd4c426c0a9cf98cf
parentb2af808fd63f227b4a5d8fc765b5635b8c27a7b0 (diff)
downloadaur-1523c2b5fd445c7d0f09279d79aec524cfbbfde5.tar.gz
chore: add .SRCINFO and justfile
-rw-r--r--.SRCINFO2
-rw-r--r--.dockerignore2
-rw-r--r--Dockerfile4
-rwxr-xr-xPKGBUILD9
-rw-r--r--README.md10
-rw-r--r--justfile7
6 files changed, 21 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 68883dc7097e..b66f5a65b0f5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -4,7 +4,9 @@ pkgbase = argocd-autopilot-bin
pkgrel = 2
url = https://github.com/argoproj-labs/argocd-autopilot
arch = x86_64
+ arch = aarch64
license = Apache
provides = argocd-autopilot
pkgname = argocd-autopilot-bin
+
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000000..389959e2586d
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,2 @@
+.git
+.idea \ No newline at end of file
diff --git a/Dockerfile b/Dockerfile
index 0dd33dea30f5..d91774f38e3a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,6 @@
FROM samip537/archlinux:yay
WORKDIR /app
COPY PKGBUILD ./
-CMD makepkg -f
+CMD makepkg -f && makepkg --printsrcinfo > /volume/.SRCINFO
+
+VOLUME /volume \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
index 311093223988..a9168c8b1808 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,8 @@
# Maintainer: Ch4s3r <lamprecht.patrick1@gmail.com>
pkgname=argocd-autopilot-bin
-pkgver=v0.4.11
-pkgrel=1
+# latest version will be taken downloaded and shown in your package manager from pkgver()
+pkgver=v0.0.0
+pkgrel=2
pkgdesc="Argo-CD Autopilot is a tool which offers an opinionated way of installing Argo-CD and managing GitOps repositories."
arch=(x86_64 aarch64)
url="https://github.com/argoproj-labs/argocd-autopilot"
@@ -19,7 +20,9 @@ package() {
ARCH=amd64
fi
- curl -L --output - https://github.com/argoproj-labs/argocd-autopilot/releases/download/$pkgver/argocd-autopilot-linux-$ARCH.tar.gz | tar zx
+ export VERSION=`curl -s "https://api.github.com/repos/argoproj-labs/argocd-autopilot/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/'`
+ curl -L --output argocd-autopilot.tar.gz "https://github.com/argoproj-labs/argocd-autopilot/releases/download/$VERSION/argocd-autopilot-linux-$ARCH.tar.gz"
+ tar xzf argocd-autopilot.tar.gz
mv argocd-autopilot-* argocd-autopilot
install -Dm755 argocd-autopilot "$pkgdir/usr/bin/argocd-autopilot"
diff --git a/README.md b/README.md
index 62ca5f5638bc..89d2f8c5ddf6 100644
--- a/README.md
+++ b/README.md
@@ -5,19 +5,11 @@ Downloads the latest official `argocd-autopilot` binary.
## How to publish to AUR
```shell
-git remote add aur ssh://aur@aur.archlinux.org/argocd-autopilot-bin.git
-```
-```shell
-git push aur main:master
```
## Building locally in container
```shell
-docker build -t makepkg .
-```
-
-```shell
-docker run --rm -it makepkg
+just build
``` \ No newline at end of file
diff --git a/justfile b/justfile
new file mode 100644
index 000000000000..f4ac7da1f7cf
--- /dev/null
+++ b/justfile
@@ -0,0 +1,7 @@
+build:
+ docker build -t makepkg .
+ docker run -v $PWD:/volume --rm -it makepkg
+
+push:
+ git remote add aur ssh://aur@aur.archlinux.org/argocd-autopilot-bin.git &> /dev/null
+ git push aur main:master \ No newline at end of file