Skip to content

Commit

Permalink
for apidiff, generate apidiff/next.txt and rotate it on release
Browse files Browse the repository at this point in the history
instead of already giving it a version name before the release. the released
version could be different.
  • Loading branch information
mjl- committed Mar 11, 2024
1 parent bcf737c commit 411cb8f
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ webaccount/account.js: lib.ts webaccount/api.ts webaccount/account.ts
frontend: webadmin/admin.js webaccount/account.js webmail/webmail.js webmail/msg.js webmail/text.js

genapidiff:
# needs file next.txt containing next version number, and golang.org/x/exp/cmd/[email protected] installed
# needs golang.org/x/exp/cmd/[email protected] installed
./apidiff.sh

docker:
Expand Down
9 changes: 4 additions & 5 deletions apidiff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
set -e

prevversion=$(go list -mod=readonly -m -f '{{ .Version }}' github.com/mjl-/mox@latest)
nextversion=$(cat next.txt)
if ! test -d tmp/mox-$prevversion; then
mkdir -p tmp/mox-$prevversion
git archive --format=tar $prevversion | tar -C tmp/mox-$prevversion -xf -
fi
(rm -r tmp/apidiff || exit 0)
mkdir -p tmp/apidiff/$prevversion tmp/apidiff/next
(rm apidiff/$nextversion.txt || exit 0)
(rm apidiff/next.txt || exit 0)
(
echo "Below are the incompatible changes between $prevversion and $nextversion, per package."
echo "Below are the incompatible changes between $prevversion and next, per package."
echo
) >>apidiff/$nextversion.txt
) >>apidiff/next.txt
for p in $(cat apidiff/packages.txt); do
(cd tmp/mox-$prevversion && apidiff -w ../apidiff/$prevversion/$p.api ./$p)
apidiff -w tmp/apidiff/next/$p.api ./$p
(
echo '#' $p
apidiff -incompatible tmp/apidiff/$prevversion/$p.api tmp/apidiff/next/$p.api
echo
) >>apidiff/$nextversion.txt
) >>apidiff/next.txt
done
38 changes: 38 additions & 0 deletions apidiff/next.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Below are the incompatible changes between v0.0.10 and next, per package.

# dane

# dmarc

# dmarcrpt

# dns

# dnsbl

# iprev

# message

# mtasts

# publicsuffix

# ratelimit

# sasl

# scram

# smtp

# smtpclient

# spf

# subjectpass

# tlsrpt

# updates

2 changes: 2 additions & 0 deletions develop.txt
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ done
- Send and receive email with imap4/smtp clients.
- Check DNS check admin page.
- Check with https://internet.nl.
- Move apidiff/next.txt to apidiff/<version>.txt, and create empty next.txt.
- Add release to the Latest release & News sections of website/index.md.
- Create git tag, push code.
- Publish new docker image.
Expand All @@ -298,3 +299,4 @@ done
instructions to prevent confusion about "assets" github links to.
- Publish new cross-referenced code/rfc to www.xmox.nl/xr/.
- Update moxtools with latest version.
- Update implementations support matrix.

0 comments on commit 411cb8f

Please sign in to comment.