mirror of
https://codeberg.org/scip/diceware.git
synced 2025-12-17 19:00:57 +01:00
Compare commits
21 Commits
v1.3.0-cod
...
v1.3.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 42a89f577c | |||
| 900d62b72e | |||
| 101f3b13ca | |||
| cd379b29e7 | |||
| dfc8bcdd06 | |||
| b129e638f7 | |||
| 1c64695700 | |||
| 24a08023ed | |||
| 40200bb035 | |||
| 27d56b9bf9 | |||
| 1f09d65b99 | |||
| 0f747bef92 | |||
| 8b8f609c66 | |||
| a5328f2bdd | |||
| 36dff3796d | |||
| 3e2d233ddc | |||
| 8b36768b39 | |||
| 749f252266 | |||
| 60e2f144eb | |||
| 310731c5f1 | |||
| 13cca6642b |
@@ -1,54 +0,0 @@
|
|||||||
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
|
|
||||||
|
|
||||||
version: 2
|
|
||||||
|
|
||||||
gitea_urls:
|
|
||||||
api: https://codeberg.org/api/v1
|
|
||||||
download: https://codeberg.org
|
|
||||||
|
|
||||||
builds:
|
|
||||||
- builder: prebuilt
|
|
||||||
goos:
|
|
||||||
- linux
|
|
||||||
goarch:
|
|
||||||
- amd64
|
|
||||||
goamd64:
|
|
||||||
- v1
|
|
||||||
prebuilt:
|
|
||||||
path: output/mybin_{{ .Os }}_{{ .Arch }}{{ with .Amd64 }}_{{ . }}{{ end }}/mybin
|
|
||||||
binary: bin/mybin
|
|
||||||
|
|
||||||
archives:
|
|
||||||
- formats: [binary]
|
|
||||||
name_template: >-
|
|
||||||
{{ .ProjectName }}_
|
|
||||||
{{- title .Os }}_
|
|
||||||
{{- if eq .Arch "amd64" }}x86_64
|
|
||||||
{{- else if eq .Arch "386" }}i386
|
|
||||||
{{- else }}{{ .Arch }}{{ end }}
|
|
||||||
{{- if .Arm }}v{{ .Arm }}{{ end }}_{{ .Tag }}
|
|
||||||
wrap_in_directory: true
|
|
||||||
|
|
||||||
changelog:
|
|
||||||
sort: asc
|
|
||||||
filters:
|
|
||||||
exclude:
|
|
||||||
- "^docs:"
|
|
||||||
- "^test:"
|
|
||||||
groups:
|
|
||||||
- title: Improved
|
|
||||||
regexp: '^.*?(feat|add|new)(\([[:word:]]+\))??!?:.+$'
|
|
||||||
order: 0
|
|
||||||
- title: Fixed
|
|
||||||
regexp: '^.*?(bug|fix)(\([[:word:]]+\))??!?:.+$'
|
|
||||||
order: 1
|
|
||||||
- title: Changed
|
|
||||||
order: 999
|
|
||||||
|
|
||||||
release:
|
|
||||||
header: "# Release Notes"
|
|
||||||
footer: >-
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Full Changelog: [{{ .PreviousTag }}...{{ .Tag }}](https://codeberg.org/scip/diceware/compare/{{ .PreviousTag }}...{{ .Tag }})
|
|
||||||
@@ -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
|
|
||||||
@@ -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
|
|
||||||
8
Makefile
8
Makefile
@@ -22,7 +22,6 @@ CFLAGS = -Wall -Wextra -Werror -O1 -g
|
|||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
OBJS = dicepwgen.o dictfile.o tossing.o debug.o
|
OBJS = dicepwgen.o dictfile.o tossing.o debug.o
|
||||||
DST = dicepwgen
|
DST = dicepwgen
|
||||||
STATIC = dicepwgen_static
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
UID = root
|
UID = root
|
||||||
GID = 0
|
GID = 0
|
||||||
@@ -36,13 +35,6 @@ all: $(DST)
|
|||||||
$(DST): $(OBJS)
|
$(DST): $(OBJS)
|
||||||
gcc -DDICTFILE=$(DICTFILE) $(OBJS) -o $(DST)
|
gcc -DDICTFILE=$(DICTFILE) $(OBJS) -o $(DST)
|
||||||
|
|
||||||
static: $(STATIC)
|
|
||||||
|
|
||||||
$(STATIC): $(OBJS)
|
|
||||||
gcc -DDICTFILE=$(DICTFILE) -static $(OBJS) -o $(STATIC)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
gcc -c $(CFLAGS) -DDICTFILE=$(DICTFILE) $*.c -o $*.o
|
gcc -c $(CFLAGS) -DDICTFILE=$(DICTFILE) $*.c -o $*.o
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user