diff --git a/.drone.yml b/.drone.yml index d3df952..9143a31 100644 --- a/.drone.yml +++ b/.drone.yml @@ -3,29 +3,51 @@ name: default type: docker steps: - - name: Get apt packages + - name: Create apt packages image: "ubuntu:latest" commands: + - env - apt update - - apt install -y wget reprepro + - apt install -y git reprepro wget - bash ./prepare-pages.sh - - mv repo/ /pkg - volumes: - - name: pkg - path: /pkg - - name: Push to Pages - image: plugins/gh-pages - settings: - netrc_machine: git.froth.zone - target_branch: pages - pages_directory: /pkg - username: sam - password: - from_secret: GITEA_PASSWORD + - mkdir -p /pkg/repo + - mv repo /pkg/repo/apt + - mv db /db + environment: + TAG: ${TAG} volumes: - name: pkg path: /pkg + - name: Push to Pages + image: plugins/gh-pages + settings: + remote_url: git@git.froth.zone:packages/awl.git + ssh_key: + from_secret: SSH_KEY + target_branch: pages + pages_directory: /pkg/repo + 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 + remote: ssh://git@git.froth.zone:packages/awl.git + ssh_key: + from_secret: SSH_KEY + target_branch: pages + commit: true + commit_message: Update DB + depends_on: + - "Create apt packages" + volumes: - name: pkg temp: {} diff --git a/.gitignore b/.gitignore index a8f830a..5ee21e0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,4 @@ .dccache *.deb -db/ repo/ diff --git a/conf/distributions b/conf/distributions index 582e6fd..6984ceb 100644 --- a/conf/distributions +++ b/conf/distributions @@ -1,3 +1,4 @@ Codename: awl Components: main -Architectures: i386 amd64 armhf arm64 +Architectures: i386 amd64 armhf arm64 source +Limit: 0 diff --git a/db/checksums.db b/db/checksums.db new file mode 100644 index 0000000..2868da3 Binary files /dev/null and b/db/checksums.db differ diff --git a/db/contents.cache.db b/db/contents.cache.db new file mode 100644 index 0000000..b3f6280 Binary files /dev/null and b/db/contents.cache.db differ diff --git a/db/packagenames.db b/db/packagenames.db new file mode 100644 index 0000000..074e184 Binary files /dev/null and b/db/packagenames.db differ diff --git a/db/packages.db b/db/packages.db new file mode 100644 index 0000000..f4a1cf5 Binary files /dev/null and b/db/packages.db differ diff --git a/db/references.db b/db/references.db new file mode 100644 index 0000000..6f29f3a Binary files /dev/null and b/db/references.db differ diff --git a/db/release.caches.db b/db/release.caches.db new file mode 100644 index 0000000..6c4898e Binary files /dev/null and b/db/release.caches.db differ diff --git a/db/version b/db/version new file mode 100644 index 0000000..e860ffe --- /dev/null +++ b/db/version @@ -0,0 +1,4 @@ +5.3.0 +3.3.0 +bdb5.3.28 +bdb5.3.0 diff --git a/prepare-pages.sh b/prepare-pages.sh index 4e2ca33..ecba7c5 100755 --- a/prepare-pages.sh +++ b/prepare-pages.sh @@ -1,6 +1,15 @@ #!/usr/bin/env bash set -e +# 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 @@ -8,13 +17,13 @@ fi arches=("amd64" "386" "armv6" "arm64") -notag=$(sed 's/v//' <<<"$TAG") +notag=${TAG//v/} for arch in "${arches[@]}"; do - # wget "http://localhost:8080/awl_${notag}_linux_${arch}.deb" - wget "https://git.froth.zone/sam/awl/releases/$TAG/download/awl_${notag}_linux_${arch}.deb" + 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/