You've already forked open-video-downloader-bin
Compare commits
3 Commits
main
...
6d37d7d140
| Author | SHA1 | Date | |
|---|---|---|---|
| 6d37d7d140 | |||
| d92de932d2 | |||
| 9b6536d2dc |
8
.SRCINFO
8
.SRCINFO
@@ -1,7 +1,7 @@
|
|||||||
pkgbase = open-video-downloader-bin
|
pkgbase = open-video-downloader-bin
|
||||||
pkgdesc = A cross-platform GUI for youtube-dl made in Rust with Tauri and Vue + Typescript
|
pkgdesc = A cross-platform GUI for youtube-dl made in Rust with Tauri and Vue + Typescript
|
||||||
pkgver = 3.2.1
|
pkgver = 3.2.0
|
||||||
pkgrel = 2
|
pkgrel = 1
|
||||||
url = https://github.com/jely2002/youtube-dl-gui
|
url = https://github.com/jely2002/youtube-dl-gui
|
||||||
arch = x86_64
|
arch = x86_64
|
||||||
license = AGPL3
|
license = AGPL3
|
||||||
@@ -11,7 +11,7 @@ pkgbase = open-video-downloader-bin
|
|||||||
conflicts = open-video-downloader
|
conflicts = open-video-downloader
|
||||||
options = !strip
|
options = !strip
|
||||||
options = !debug
|
options = !debug
|
||||||
source = open-video-downloader-3.2.1.deb::https://github.com/jely2002/youtube-dl-gui/releases/download/app-v3.2.1/Open.Video.Downloader_3.2.1_amd64.deb
|
source = open-video-downloader-3.2.0.deb::https://github.com/jely2002/youtube-dl-gui/releases/download/app-v3.2.0/Open.Video.Downloader_3.2.0_amd64.deb
|
||||||
sha256sums = 6a17c371653038e5b7ab88d25fdec407ff9532a933c8f2d755a53833761f4568
|
sha256sums = 2a0190508c5b80d2801765073385439bf6dac7749473c19f842fbd5067f18e15
|
||||||
|
|
||||||
pkgname = open-video-downloader-bin
|
pkgname = open-video-downloader-bin
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
# Autoupdater manifest - consumed by aur/.autoupdate
|
|
||||||
srchost="github"
|
|
||||||
srcmntr="jely2002"
|
|
||||||
srcname="youtube-dl-gui"
|
|
||||||
verstrip="app-v"
|
|
||||||
gui="false"
|
|
||||||
32
.gitea/workflows/update.yaml
Normal file
32
.gitea/workflows/update.yaml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
name: Update Package Version
|
||||||
|
concurrency:
|
||||||
|
group: update-package-version
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- run: |
|
||||||
|
git config --global user.name "${GIT_NAME}"
|
||||||
|
git config --global user.email "${GIT_EMAIL}"
|
||||||
|
git config --global credential.helper store
|
||||||
|
echo "https://${GIT_EMAIL//@/%40}:${GIT_TOKEN}@git.bjphoster.com" > ~/.git-credentials
|
||||||
|
source PKGBUILD
|
||||||
|
./push.sh $(curl -L -H "Accept: application/vnd.github+json" https://api.github.com/repos/${_srcmntr}/${_srcname}/releases/latest | jq ".tag_name" | sed 's|"||g;s|app-v||')
|
||||||
|
env:
|
||||||
|
GIT_NAME: ${{ secrets.GIT_NAME }}
|
||||||
|
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
|
||||||
|
GIT_TOKEN: ${{ secrets.GIT_TOKEN }}
|
||||||
6
PKGBUILD
6
PKGBUILD
@@ -5,8 +5,8 @@ _srcname="youtube-dl-gui"
|
|||||||
_srcmntr="jely2002"
|
_srcmntr="jely2002"
|
||||||
|
|
||||||
pkgname="${_pkgname}-bin"
|
pkgname="${_pkgname}-bin"
|
||||||
pkgver="3.2.1"
|
pkgver="3.2.0"
|
||||||
pkgrel="2"
|
pkgrel="1"
|
||||||
pkgdesc="A cross-platform GUI for youtube-dl made in Rust with Tauri and Vue + Typescript"
|
pkgdesc="A cross-platform GUI for youtube-dl made in Rust with Tauri and Vue + Typescript"
|
||||||
url="https://github.com/${_srcmntr}/${_srcname}"
|
url="https://github.com/${_srcmntr}/${_srcname}"
|
||||||
arch=("x86_64")
|
arch=("x86_64")
|
||||||
@@ -18,7 +18,7 @@ source=("${_archive}::https://github.com/${_srcmntr}/${_srcname}/releases/downlo
|
|||||||
conflicts=("open-video-downloader")
|
conflicts=("open-video-downloader")
|
||||||
provides=("open-video-downloader")
|
provides=("open-video-downloader")
|
||||||
|
|
||||||
sha256sums=("6a17c371653038e5b7ab88d25fdec407ff9532a933c8f2d755a53833761f4568")
|
sha256sums=("2a0190508c5b80d2801765073385439bf6dac7749473c19f842fbd5067f18e15")
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
bsdtar -xf "${srcdir}/data.tar.gz" -C "${pkgdir}"
|
bsdtar -xf "${srcdir}/data.tar.gz" -C "${pkgdir}"
|
||||||
|
|||||||
101
push.sh
Executable file
101
push.sh
Executable file
@@ -0,0 +1,101 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Variables
|
||||||
|
gui=false
|
||||||
|
desktop="Open Video Downloader.desktop"
|
||||||
|
icon="open-video-downloader.png"
|
||||||
|
|
||||||
|
# Get version
|
||||||
|
oldver=$(grep -E "^pkgver=" PKGBUILD | sed 's/pkgver="//;s/"//')
|
||||||
|
if [ $# -eq 1 ]; then
|
||||||
|
pkgver="${1}"
|
||||||
|
else
|
||||||
|
echo "Old version: ${oldver}"
|
||||||
|
read -p "New version: " pkgver
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check version
|
||||||
|
if [ "${pkgver}" = "${oldver}" ] && [ -z "${FORCE_REBUILD}" ]; then
|
||||||
|
echo >/dev/stderr "Error: same (old) version specified - update aborted"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get variables from PKGBUILD
|
||||||
|
url=$(sed -n '/^source=(/,/)/p' PKGBUILD | grep -oE 'https?://[^"]+')
|
||||||
|
pkgname=$(grep -E "^pkgname=" PKGBUILD | sed 's/pkgname="//;s/"//')
|
||||||
|
_pkgname=$(grep -E "^_pkgname=" PKGBUILD | sed 's/_pkgname="//;s/"//')
|
||||||
|
_srcname=$(grep -E "^_srcname=" PKGBUILD | sed 's/_srcname="//;s/"//')
|
||||||
|
_srcmntr=$(grep -E "^_srcmntr=" PKGBUILD | sed 's/_srcmntr="//;s/"//')
|
||||||
|
_archive=$(grep -E "^_archive=" PKGBUILD | sed 's/_archive="//;s/"//')
|
||||||
|
pkgrel=$(grep -E "^pkgrel=" PKGBUILD | sed 's/pkgrel="//;s/"//')
|
||||||
|
aur_url="ssh://aur@aur.archlinux.org/${pkgname}.git"
|
||||||
|
if [ "${gui}" = "true" ] && [ -n "${_pkgname}" ]; then
|
||||||
|
newdesktop="${_pkgname}.desktop"
|
||||||
|
newicon="${_pkgname}.png"
|
||||||
|
else
|
||||||
|
newdesktop="${package}.desktop"
|
||||||
|
newicon="${package}.png"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Perform variable substitution
|
||||||
|
url="${url//\$\{pkgname\}/$pkgname}"
|
||||||
|
url="${url//\$\{_pkgname\}/$_pkgname}"
|
||||||
|
url="${url//\$\{_srcname\}/$_srcname}"
|
||||||
|
url="${url//\$\{_srcmntr\}/$_srcmntr}"
|
||||||
|
url="${url//\$\{pkgver\}/$pkgver}"
|
||||||
|
_archive="${_archive//\$\{pkgname\}/$pkgname}"
|
||||||
|
_archive="${_archive//\$\{_pkgname\}/$_pkgname}"
|
||||||
|
_archive="${_archive//\$\{pkgver\}/$pkgver}"
|
||||||
|
aur_url="${aur_url//\$\{_pkgname\}/$_pkgname}"
|
||||||
|
|
||||||
|
# Download archive
|
||||||
|
wget -O ${_archive} "${url}"
|
||||||
|
# Extract icon / .desktop files if appimage
|
||||||
|
if printf '%s' "${_archive,,}" | grep -qi "appimage"; then
|
||||||
|
chmod +x "${_archive}"
|
||||||
|
"./${_archive}" --appimage-extract
|
||||||
|
cp "squashfs-root/${desktop}" "${newdesktop}"
|
||||||
|
cp "squashfs-root/${icon}" "${newicon}"
|
||||||
|
if [ -L "squashfs-root" ]; then
|
||||||
|
rm -rf $(readlink -f squashfs-root) squashfs-root
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Calculate checksums
|
||||||
|
sha256bin=$(sha256sum ${_archive} | awk '{print $1}')
|
||||||
|
if [ "${gui}" = "true" ]; then
|
||||||
|
sha256dsk=$(sha256sum ${newdesktop} | awk '{print $1}')
|
||||||
|
sha256ico=$(sha256sum ${newicon} | awk '{print $1}')
|
||||||
|
fi
|
||||||
|
# Yoink the archive - unnecessary anymore
|
||||||
|
rm -f ${_archive}
|
||||||
|
|
||||||
|
# Update PKGBUILD with new values
|
||||||
|
sed -i -E "s/^pkgver=\"[^\"]+\"/pkgver=\"$pkgver\"/" PKGBUILD
|
||||||
|
if [ "${gui}" = "true" ]; then
|
||||||
|
sed -i '/^sha256sums=(/,/^)/c\
|
||||||
|
sha256sums=(\
|
||||||
|
"'"$sha256bin"'"\
|
||||||
|
"'"$sha256dsk"'"\
|
||||||
|
"'"$sha256ico"'"\
|
||||||
|
)' PKGBUILD
|
||||||
|
else
|
||||||
|
sed -i -E "s|^sha256sums=.*|sha256sums=(\"$sha256bin\")|" PKGBUILD
|
||||||
|
fi
|
||||||
|
# Update .SRCINFO
|
||||||
|
makepkg --printsrcinfo > .SRCINFO
|
||||||
|
|
||||||
|
# Create git message with correct variable
|
||||||
|
if [ -n "$_pkgname" ]; then
|
||||||
|
commit_msg="Updated ${pkgname//\$\{_pkgname\}/_pkgname} to ${pkgver}-${pkgrel}"
|
||||||
|
else
|
||||||
|
commit_msg="Updated ${pkgname} to ${pkgver}-${pkgrel}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${NO_GIT_PUSH}" ]; then
|
||||||
|
# In case of fire, git commit, git push, leave building
|
||||||
|
git add .
|
||||||
|
git commit -m "Updated ${pkgname} to ${pkgver}-${pkgrel}"
|
||||||
|
git remote add aur ${aur_url}
|
||||||
|
git push origin main
|
||||||
|
git push aur main:master
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user