21 Commits

Author SHA1 Message Date
42a89f577c add badge and better description 2025-11-05 22:30:15 +01:00
900d62b72e bump version 2025-11-05 22:24:31 +01:00
101f3b13ca show test output 2025-11-05 22:18:43 +01:00
cd379b29e7 more tests 2025-11-05 22:17:23 +01:00
dfc8bcdd06 try test again 2025-11-05 22:09:26 +01:00
b129e638f7 check again 2025-11-05 22:08:42 +01:00
1c64695700 +debug 2025-11-05 22:04:46 +01:00
24a08023ed fix free len 2025-11-05 22:01:43 +01:00
40200bb035 -debug 2025-11-05 21:58:51 +01:00
27d56b9bf9 fix malloc size 2025-11-05 21:58:15 +01:00
1f09d65b99 +debug 2025-11-05 21:54:46 +01:00
0f747bef92 format 2025-11-05 21:53:27 +01:00
8b8f609c66 try with valgrind 2025-11-05 21:35:37 +01:00
a5328f2bdd check for nil 2025-11-05 21:31:58 +01:00
36dff3796d fix format, fix free() 2025-11-05 21:27:38 +01:00
3e2d233ddc add gdb 2025-11-05 21:16:42 +01:00
8b36768b39 check segfault 2025-11-05 21:16:02 +01:00
749f252266 fix test 2025-11-05 21:10:17 +01:00
60e2f144eb try a test run 2025-11-05 21:09:22 +01:00
310731c5f1 try buildbase 2025-11-05 20:58:48 +01:00
13cca6642b add ci pipeline 2025-11-05 20:55:10 +01:00
3 changed files with 0 additions and 90 deletions

View File

@@ -1,54 +0,0 @@
#!/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}-${version}" "attachment@${file}"
done

View File

@@ -1,28 +0,0 @@
# build release
labels:
platform: linux/amd64
steps:
compile:
when:
event: [tag,manual]
image: alpine:latest
commands:
- apk update
- apk add --no-cache bash build-base
- make static
- file dicepwgen_static
- mv dicepwgen_static dicepwgen-linux-amd64
release:
image: alpine:latest
when:
event: [tag,manual]
environment:
DEPLOY_TOKEN:
from_secret: DEPLOY_TOKEN
commands:
- apk update
- apk add --no-cache bash httpie jq git
- .woodpecker/release.sh dicepwgen-linux-amd64

View File

@@ -22,7 +22,6 @@ CFLAGS = -Wall -Wextra -Werror -O1 -g
LDFLAGS =
OBJS = dicepwgen.o dictfile.o tossing.o debug.o
DST = dicepwgen
STATIC = dicepwgen_static
PREFIX = /usr/local
UID = root
GID = 0
@@ -36,13 +35,6 @@ all: $(DST)
$(DST): $(OBJS)
gcc -DDICTFILE=$(DICTFILE) $(OBJS) -o $(DST)
static: $(STATIC)
$(STATIC): $(OBJS)
gcc -DDICTFILE=$(DICTFILE) -static $(OBJS) -o $(STATIC)
%.o: %.c
gcc -c $(CFLAGS) -DDICTFILE=$(DICTFILE) $*.c -o $*.o