Compare commits
No commits in common. "c26607216bf6c2cfa6134174d599c0acef1424b2" and "08ae202cd7814c22d7fca138cd63cd271410f6bc" have entirely different histories.
c26607216b
...
08ae202cd7
13
README.md
13
README.md
|
@ -1,13 +0,0 @@
|
|||
# Debian Packages
|
||||
|
||||
My workflow to build deb files.
|
||||
|
||||
## Build all packages and upload to webdav
|
||||
|
||||
```
|
||||
export WEBDAV_USER=webdav_user
|
||||
export WEBDAV_PASS=abcdefghijklmnopqrstuvwxyz
|
||||
export WEBDAV_HOST=https://webdav.example.com
|
||||
export WEBDAV_REPOPATH=packages
|
||||
bash script/build_all.sh
|
||||
```
|
|
@ -17,9 +17,9 @@ source=(
|
|||
function package {
|
||||
install -Dm755 ${srcdir}/filebrowser ${pkgdir}/usr/bin/filebrowser
|
||||
|
||||
install -Dm644 ${srcdir}/CHANGELOG.md ${pkgdir}/usr/share/filebrowser/CHANGELOG.md
|
||||
install -Dm644 ${srcdir}/LICENSE ${pkgdir}/usr/share/filebrowser/LICENSE
|
||||
install -Dm644 ${srcdir}/README.md ${pkgdir}/usr/share/filebrowser/README.md
|
||||
install -Dm644 -T ${srcdir}/CHANGELOG.md ${pkgdir}/usr/share/filebrowser/
|
||||
install -Dm644 -T ${srcdir}/LICENSE ${pkgdir}/usr/share/filebrowser/
|
||||
install -Dm644 -T ${srcdir}/README.md ${pkgdir}/usr/share/filebrowser/
|
||||
|
||||
install -Dm644 ${srcdir}/filebrowser.service ${pkgdir}/usr/lib/systemd/system/filebrowser.service
|
||||
}
|
2
makedeb
2
makedeb
|
@ -1 +1 @@
|
|||
Subproject commit b57dab0489524afbe935de972b4c8a108cc1b2e2
|
||||
Subproject commit 29574d90b49e716c0e53c821db38a4e5197a198a
|
|
@ -1,57 +0,0 @@
|
|||
#!/usr/bin/evn bash
|
||||
#
|
||||
set -o pipefail
|
||||
set -o errexit
|
||||
set -o errtrace
|
||||
|
||||
WEBDAV_USER=${WEBDAV_USER:?WEBDAV_USER not set}
|
||||
WEBDAV_PASS=${WEBDAV_PASS:?WEBDAV_PASS not set}
|
||||
WEBDAV_HOST=${WEBDAV_HOST:?WEBDAV_HOST not set}
|
||||
WEBDAV_REPOPATH=${WEBDAV_REPOPATH:?WEBDAV_REPOPATH not set}
|
||||
|
||||
function curl_alias {
|
||||
curl --show-error --silent --user "${WEBDAV_USER}:${WEBDAV_PASS}" "$@"
|
||||
}
|
||||
|
||||
function webdav_is_file_exists {
|
||||
local target="${1%/}"
|
||||
local target="${target#/}"
|
||||
local resp=$(curl_alias --head --write-out "%{http_code}" "${WEBDAV_HOST}/${WEBDAV_REPOPATH}/${target}" | tail -n 1)
|
||||
[[ "${resp}" == "200" ]]
|
||||
}
|
||||
|
||||
function webdav_mkcol {
|
||||
local dirname="${1#/}"
|
||||
curl_alias --request MKCOL "${WEBDAV_HOST}/${dirname}"
|
||||
}
|
||||
|
||||
function webdav_upload_file {
|
||||
curl_alias --silent --upload-file "$1" "${WEBDAV_HOST}/${WEBDAV_REPOPATH}/$2"
|
||||
echo "file $1 uploaded to ${WEBDAV_HOST}/${WEBDAV_REPOPATH}/$2"
|
||||
}
|
||||
|
||||
function build_single {
|
||||
(
|
||||
local package_name="$1"
|
||||
local package_path="$(realpath "$1")"
|
||||
cd "$package_path"
|
||||
local target_filename="$(../makedeb/makedeb -STF | tail -n 1)"
|
||||
|
||||
if webdav_is_file_exists "${target_filename}" ; then
|
||||
echo "${package_name} already built, skipped."
|
||||
return
|
||||
fi
|
||||
|
||||
../makedeb/makedeb
|
||||
|
||||
webdav_upload_file "${target_filename}" "${target_filename}"
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
for i in $(find . -maxdepth 1 -mindepth 1 -type d -not -path './script' -not -path './makedeb' -not -name '.*')
|
||||
do
|
||||
echo === building $i
|
||||
build_single $i
|
||||
echo === built $i
|
||||
done
|
|
@ -1,25 +0,0 @@
|
|||
#/usr/bin/env bash
|
||||
|
||||
pkgname="static-deployer"
|
||||
pkgver=0.0.6.g7067e8f
|
||||
pkgrel=1
|
||||
pkgdesc="A simple daemon to deploy static site"
|
||||
url="https://git.leafee98.com/leafee98/static_deployer"
|
||||
maintainer="Leafee98 <me@leafee98.com>"
|
||||
|
||||
source=(
|
||||
"static_deployer::git+https://git.leafee98.com/leafee98/static_deployer.git"
|
||||
)
|
||||
|
||||
function pkgver {
|
||||
git -C src/static_deployer describe --tags --long | sed -e 's/^v//; s/-/./g'
|
||||
}
|
||||
|
||||
function pkgver {
|
||||
git -C "${srcdir}/static_deployer" describe --tags --long | sed 's/^v//;s/-/./g'
|
||||
}
|
||||
|
||||
function package {
|
||||
install -D "${srcdir}/static_deployer/main.py" "${pkgdir}/usr/bin/static-deployer"
|
||||
}
|
||||
|
Loading…
Reference in a new issue