aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnderson Rocha(MAX)2021-12-10 14:02:13 -0300
committerAnderson Rocha(MAX)2021-12-10 14:02:13 -0300
commit5eb2cc7eb48076b5e246d5421e0f521648c8577e (patch)
treec0766c06a9a344805086e24e63ab5e8a5f95d62d
parentc209b6ab5a12e35090260667f5c6a18053d03ded (diff)
downloadaur-5eb2cc7eb48076b5e246d5421e0f521648c8577e.tar.gz
Update auto updater + readme
-rwxr-xr-xPKGBUILD2
-rw-r--r--README.md26
-rw-r--r--auto_update.sh21
3 files changed, 40 insertions, 9 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 85e1503ef27b..b8180b1b49e0 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,4 +1,4 @@
-# Maintainer: Anderson Rocha <anderson2320@gmail.com>
+# Active Maintainers: Anderson Rocha <anderson2320@gmail.com>
pkgname=cef-minimal
pkgver="96.0.17"
diff --git a/README.md b/README.md
new file mode 100644
index 000000000000..0694bdef69c1
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
+## How to update
+
+The process of auto update follows the following workflow
+1. pull repo from AUR
+2. Patch hashs and versions for `linux64`
+3. Patch hashs and versions for `linux32`
+4. Builds the package
+5. If succeeds, generate the commit `[AUTO] Version <version>`
+6. Clean up the build folder
+
+Run the following command to update
+```sh
+$ sh auto_update.sh
+```
+
+Dry run (download and build)
+```sh
+$ SKIP_PUSH=true sh auto_update.sh
+```
+
+### Maintainers
+Active Maintainers:
+- Anderson Rocha <anderson2320@gmail.com>
+
+Previous Maintainers:
+- NexAdn <nexadn@yandex.com>
diff --git a/auto_update.sh b/auto_update.sh
index 7d66b85f5c8e..b0a52ac87f6d 100644
--- a/auto_update.sh
+++ b/auto_update.sh
@@ -4,15 +4,15 @@ service_url="https://cef-builds.spotifycdn.com"
versions=$(curl -s "$service_url/index.json")
-stripQuotes(){
- sed -e 's/^"//' -e 's/"$//' <<<$1
+stripQuotes() {
+ sed -e 's/^"//' -e 's/"$//' <<<$1
}
replace_line() {
sed -i "$2s#.*#$1#" $3
}
-update_version(){
+update_version() {
local arch=$1;
stable=$(echo $versions | jq ".$arch.versions | .[1]");
@@ -39,7 +39,6 @@ update_version(){
# update .SRCINFO
replace_line " pkgver = $version" 3 .SRCINFO
-
if [ $arch = "linux64" ]; then
replace_line "sha1sums_x86_64=(\"$sha_hash\")" 28 PKGBUILD
@@ -66,9 +65,15 @@ echo $version
echo "- Rebuilding(makepkg)..."
makepkg > /dev/null
-echo "- Uploading to AUR"
-git add .SRCINFO PKGBUILD > /dev/null
-git commit -m "[AUTO] Version $version" > /dev/null
-git push > /dev/null
+if [ -z ${SKIP_PUSH+x} ]; then
+ echo "- Uploading to AUR"
+ git add .SRCINFO PKGBUILD > /dev/null
+ git commit -m "[AUTO] Version $version" > /dev/null
+ git push > /dev/null
+fi
+
+echo "Cleanup"
+rm -r src/* > /dev/null
+rm -r pkg/* > /dev/null
echo "DONE"