mirror of
https://codeberg.org/scip/leo.git
synced 2025-12-16 12:11:04 +01:00
move to codeberg (#5)
This commit is contained in:
24
.woodpecker/build.yaml
Normal file
24
.woodpecker/build.yaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- image: perl:5.36.0-slim-bullseye
|
||||||
|
- image: perl:5.38.0-slim-bookworm
|
||||||
|
- image: perl:5.40.0-slim-bookworm
|
||||||
|
- image: perl:5.42.0-slim-bookworm
|
||||||
|
- image: perl:5.43.5-slim-bookworm
|
||||||
|
|
||||||
|
steps:
|
||||||
|
test:
|
||||||
|
when:
|
||||||
|
event: [push]
|
||||||
|
image: ${image}
|
||||||
|
commands:
|
||||||
|
- apt-get update -y
|
||||||
|
- apt-get install -y gcc libexpat1-dev libexpat1
|
||||||
|
- cpanm -n XML::Parser || cat /root/.cpanm/work/*/build.log
|
||||||
|
- cpanm -n DBM::Deep
|
||||||
|
- cpanm -n IO::Socket::SSL
|
||||||
|
- cpanm -n MIME::Base64
|
||||||
|
- cpanm -n XML::Simple
|
||||||
|
- perl Makefile.PL
|
||||||
|
- make
|
||||||
|
- make test
|
||||||
54
.woodpecker/release.sh
Executable file
54
.woodpecker/release.sh
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This is my own simple codeberg generic releaser. It takes to
|
||||||
|
# binaries to be uploaded as arguments and takes every other args from
|
||||||
|
# env. Works on tags or normal commits (push), tags must start with v.
|
||||||
|
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
die() {
|
||||||
|
echo $*
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if test -z "$DEPLOY_TOKEN"; then
|
||||||
|
die "token DEPLOY_TOKEN not set"
|
||||||
|
fi
|
||||||
|
|
||||||
|
git fetch --all
|
||||||
|
|
||||||
|
# determine current tag or commit hash
|
||||||
|
version="$CI_COMMIT_TAG"
|
||||||
|
previous=""
|
||||||
|
log=""
|
||||||
|
if test -z "$version"; then
|
||||||
|
version="${CI_COMMIT_SHA:0:6}"
|
||||||
|
log=$(git log -1 --oneline)
|
||||||
|
else
|
||||||
|
previous=$(git tag -l | grep -E "^v" | tac | grep -A1 "$version" | tail -1)
|
||||||
|
log=$(git log -1 --oneline "${previous}..${version}" | sed 's|^|- |g')
|
||||||
|
fi
|
||||||
|
|
||||||
|
# release body
|
||||||
|
printf "# Changes\n\n %s\n" "$log" > body.txt
|
||||||
|
|
||||||
|
# create the release
|
||||||
|
https --ignore-stdin --check-status -b -A bearer -a "$DEPLOY_TOKEN" POST \
|
||||||
|
"https://codeberg.org/api/v1/repos/${CI_REPO_OWNER}/${CI_REPO_NAME}/releases" \
|
||||||
|
tag_name="$version" name="Release $version" body=@body.txt > release.json
|
||||||
|
|
||||||
|
# we need the id to upload files
|
||||||
|
ID=$(jq -r .id < release.json)
|
||||||
|
|
||||||
|
if test -z "$ID"; then
|
||||||
|
cat release.json
|
||||||
|
die "failed to create release"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# actually upload
|
||||||
|
for file in "$@"; do
|
||||||
|
https --ignore-stdin --check-status -A bearer -a "$DEPLOY_TOKEN" -f POST \
|
||||||
|
"https://codeberg.org/api/v1/repos/${CI_REPO_OWNER}/${CI_REPO_NAME}/releases/$ID/assets" \
|
||||||
|
"name=${file}" "attachment@${file}"
|
||||||
|
done
|
||||||
23
.woodpecker/release.yaml
Normal file
23
.woodpecker/release.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# build release
|
||||||
|
|
||||||
|
steps:
|
||||||
|
compile:
|
||||||
|
when:
|
||||||
|
event: [tag]
|
||||||
|
image: perl:5.43.5-slim-bookworm
|
||||||
|
commands:
|
||||||
|
- perl Makefile.PL
|
||||||
|
- make
|
||||||
|
- make dist
|
||||||
|
|
||||||
|
release:
|
||||||
|
image: alpine:latest
|
||||||
|
when:
|
||||||
|
event: [tag]
|
||||||
|
environment:
|
||||||
|
DEPLOY_TOKEN:
|
||||||
|
from_secret: DEPLOY_TOKEN
|
||||||
|
commands:
|
||||||
|
- apk update
|
||||||
|
- apk add --no-cache bash httpie jq git
|
||||||
|
- .woodpecker/release.sh ${CI_REPO_NAME}-$CI_COMMIT_TAG.tar.gz
|
||||||
@@ -8,7 +8,7 @@ dict.leo.org now forces SSL via Cloudflare, we follow suit.
|
|||||||
|
|
||||||
2.00:
|
2.00:
|
||||||
|
|
||||||
Fixed rt.cpan.org#119714 rt.cpan.org#120563 and https://github.com/TLINDEN/leo/pull/1:
|
Fixed rt.cpan.org#119714 rt.cpan.org#120563 and https://codeberg.org/scip/leo/pull/1:
|
||||||
We're now implementing the XML interface, since the HTML interface
|
We're now implementing the XML interface, since the HTML interface
|
||||||
is no longer available. Many thanks to Roland Hieber for the help!
|
is no longer available. Many thanks to Roland Hieber for the help!
|
||||||
|
|
||||||
|
|||||||
2
leo
2
leo
@@ -358,7 +358,7 @@ ru to or from russian
|
|||||||
de2pl to polish
|
de2pl to polish
|
||||||
es2de spanish to german
|
es2de spanish to german
|
||||||
|
|
||||||
Report bugs to <tlinden\@cpan.org> or on https://github.com/TLINDEN/leo/issues.
|
Report bugs to <tlinden\@cpan.org> or on https://codeberg.org/scip/leo/issues.
|
||||||
);
|
);
|
||||||
|
|
||||||
exit 1;
|
exit 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user