Archived
1
0
Fork 0

A new start

This commit is contained in:
Sam Therapy 2023-02-20 20:54:21 +01:00
commit f9b756cf5f
12 changed files with 119 additions and 0 deletions

66
.drone.yml Normal file
View file

@ -0,0 +1,66 @@
kind: pipeline
name: default
type: docker
steps:
- name: Create apt packages
image: "ubuntu:latest"
commands:
- apt update
- apt install -y git reprepro wget
# Need >= 5.4.0, which isn't in the repos
- wget http://ftp.us.debian.org/debian/pool/main/r/reprepro/reprepro_5.4.1-1_amd64.deb && dpkg -i ./reprepro_5.4.1-1_amd64.deb
- rm ./reprepro_5.4.1-1_amd64.deb
- bash ./import-gpg.sh
- bash ./prepare-pages.sh
- git clone --depth 1 -b pages https://git.froth.zone/packages/awl pkg
# delete stuff that either does not matter or will get overwritten
- rm -rf pkg/.git
# overwrite anything that already exists, and merge the folders that don't
- yes | cp -rlPaf repo/* pkg/apt
# Remove (this isn't needed but makes me feel better)
- rm -rf repo/
- mv pkg/apt /pkg/apt
- rm -rf pkg/
environment:
TAG: ${TAG}
SIGNING_KEY:
from_secret: SIGNING_KEY
volumes:
- name: pkg
path: /pkg
- name: Push to Pages
image: plugins/gh-pages
settings:
remote_url:
from_secret: URL
target_branch: pages
pages_directory: /pkg
user_name: Sam Therapy
user_email: sam@samtherapy.net
volumes:
- name: pkg
path: /pkg
depends_on:
- "Create apt packages"
- name: Update the DB
image: appleboy/drone-git-push
settings:
branch: master
path: /drone/src
remote:
from_secret: URL
commit: true
tag: true
followtags: true
commit_message: Update DB
depends_on:
- "Push to Pages"
volumes:
- name: pkg
temp: {}

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
# I hate you, Snyk, but you're so useful
.dccache
*.deb
repo/
pkg/

6
conf/distributions Normal file
View file

@ -0,0 +1,6 @@
Codename: awl
Components: main
Architectures: i386 amd64 armhf arm64 source
SignWith: F8191A8C48DFEE8B
Limit: 0

BIN
db/checksums.db Normal file

Binary file not shown.

BIN
db/contents.cache.db Normal file

Binary file not shown.

BIN
db/packagenames.db Normal file

Binary file not shown.

BIN
db/packages.db Normal file

Binary file not shown.

BIN
db/references.db Normal file

Binary file not shown.

BIN
db/release.caches.db Normal file

Binary file not shown.

4
db/version Normal file
View file

@ -0,0 +1,4 @@
5.3.0
3.3.0
bdb5.3.28
bdb5.3.0

7
import-gpg.sh Normal file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
set -e
[ -z "$SIGNING_KEY" ] && echo "no key" && exit 1
echo -n "$SIGNING_KEY" | gpg --import

30
prepare-pages.sh Executable file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
set -e
if [ -z "$TAG" ]; then
# drone
if [ -n "$DRONE_TAG" ]; then
TAG=$DRONE_TAG
fi
# woodpecker
if [ -n "$CI_COMMIT_TAG" ]; then
TAG=$CI_COMMIT_TAG
fi
if [ -z "$TAG" ]; then
echo "\$TAG not set, exiting"
exit 1
fi
fi
arches=("amd64" "386" "armv6" "arm64")
notag=${TAG//v/}
for arch in "${arches[@]}"; do
wget "https://git.froth.zone/sam/awl/releases/download/$TAG/awl_${notag}_linux_${arch}.deb"
done
reprepro includedeb awl ./*.deb
mkdir -p repo
mv dists/ pool/ repo/