Skip to content
Snippets Groups Projects
Commit fab9e308 authored by Julian's avatar Julian
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
Pipeline #20464 passed
include:
- project: 'infra/packages/ci-utils'
ref: main
file: 'shared-ci.yml'
variables:
# We don't set PACKAGE_NAME since we build many different packages,
# therefore we must overwrite APT_REPO.
APT_REPO: infrapackages-dokuwiki
autoupdate:
stage: autoupdate
rules:
- if: '$RUN_AUTOUPDATE == "1"'
when: always
dependencies: []
needs: []
script:
- git clone "https://${GITLAB_ACCESS_USER}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" autoupdate-checkout
- |
set -e
cd autoupdate-checkout
git config --global user.email "infra+packages-autoupdate@cccv.de"
git config --global user.name "autoupdater"
mkdir ../tmp
grep -E '^[^#]+' config/plugins | while read -r plugin_name plugin_url; do
plugin_path="$(pwd)/tmp/${plugin_name}"
git clone --depth 1 "${plugin_url}" "${plugin_path}"
plugin_version="$(git -C "${plugin_path}" show -s --date='format:%Y%m%d' --format='0.0.%cd+git%h' HEAD)"
tag_name="release/${plugin_name}/${plugin_version}"
tag_filter="release/${plugin_name}/${plugin_version%+*}+*"
if [ "$(git tag -l "$tag_filter")" == "" ]; then
git tag "${tag_name}"
git push --tags
fi
done
package:apt:bullseye:
stage: package
rules:
- if: '$RUN_AUTOUPDATE != "1" && $CI_COMMIT_TAG =~ /^release\//'
script:
- ./scripts/prepare_package.sh "${CI_COMMIT_TAG#release/}"
- dpkg-buildpackage -us -uc
- mv ../*.deb ./
- dpkg-deb -I *.deb
- dpkg-deb -c *.deb > contents.txt
artifacts:
paths:
- ./*.deb
- debian
- contents.txt
publish:apt:buster:
extends: .publish:apt
variables:
APTLY_DISTRO: buster
APTLY_ARCH: all
dependencies:
- package:apt:bullseye
needs:
- package:apt:bullseye
publish:apt:bullseye:
extends: .publish:apt
variables:
APTLY_DISTRO: bullseye
APTLY_ARCH: all
dependencies:
- package:apt:bullseye
needs:
- package:apt:bullseye
authuffd https://git.cccv.de/uffd/dokuwiki-plugin-authuffd
bureaucracy https://github.com/splitbrain/dokuwiki-plugin-bureaucracy
include https://github.com/dokufreaks/plugin-include
pagelist https://github.com/dokufreaks/plugin-pagelist
doodle3 https://github.com/matzekuh/dokuwiki-plugin-doodle3
wrap https://github.com/selfthinker/dokuwiki_plugin_wrap
note https://github.com/lpaulsen93/dokuwiki_note
pageredirect https://github.com/glensc/dokuwiki-plugin-pageredirect
move https://github.com/michitux/dokuwiki-plugin-move
nspages https://github.com/gturri/nspages
templatepagename https://github.com/Klap-in/dokuwiki-plugin-templatepagename
sortablejs https://github.com/oiv/sortablejs
creole https://github.com/dokufreaks/plugin-creole
data https://github.com/splitbrain/dokuwiki-plugin-data
sqlite https://github.com/cosmocode/sqlite
addnewpage https://github.com/samwilson/dokuwiki-plugin-addnewpage
color https://github.com/hanche/dokuwiki_color_plugin
graphviz https://github.com/psy/dokuwiki-plugin-graphviz
drawio https://github.com/lejmr/dokuwiki-plugin-drawio
edittable https://github.com/cosmocode/edittable
#!/usr/bin/make -f
%:
dh $@
override_dh_strip_nondeterminism:
#!/bin/sh
set -e
rm -rf tmp src debian
mkdir -p src
cp -r debian_static debian
echo "$1" | sed -E 's&^([^/]+)/(.*\+git(.+))$&\1 \2 \3&' | \
while read plugin_name package_version commit_hash; do
plugin_url="$(grep -E '^[^#]+' config/plugins | while read -r line_plugin_name line_plugin_url; do
if [ "${plugin_name}" = "${line_plugin_name}" ]; then
printf '%s\n' "${line_plugin_url}"
break
fi
done)"
echo ">$plugin_name< >$package_version< >$commit_hash< >$plugin_url<"
git clone "${plugin_url}" "tmp"
git -C "tmp" checkout "${commit_hash}"
rm -r "tmp/.git"
plugin_base="$(sed -E -n 's/^base[ \t]+(.*)$/\1/p' tmp/plugin.info.txt)"
plugin_url="$(sed -E -n 's/^url[ \t]+(.*)$/\1/p' tmp/plugin.info.txt)"
plugin_desc="$(sed -E -n 's/^desc[ \t]+(.*)$/\1/p' tmp/plugin.info.txt)"
mv tmp "src/${plugin_base}"
cat > debian/control <<EOF
Source: dokuwiki-plugin-${plugin_name}
Section: web
Priority: optional
Maintainer: CCCV <it@cccv.de>
Build-Depends: debhelper-compat (= 12)
Standards-Version: 4.5.0
Homepage: ${plugin_url}
Package: dokuwiki-plugin-${plugin_name}
Architecture: all
Depends: dokuwiki
Description: ${plugin_desc}
EOF
cat > debian/changelog <<EOF
dokuwiki-plugin-${plugin_name} (${package_version}) unstable; urgency=medium
Release ${package_version}
-- autoupdater <infra+packages-autoupdate@cccv.de> $(date --rfc-email)
EOF
echo "src/${plugin_base} /usr/share/dokuwiki/lib/plugins/" > debian/install
break
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment