bots-garden/mini-me-kitpublic Fork
⑂ v0.1.4
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me-kit.git
git clone ssh://git@rickub.com/bots-garden/mini-me-kit.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. d56d1f4 · on v0.1.4 · k33g · 13d ago
release-all.sh · 44 lines · 1.2 KBBash Blame HistoryRaw
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
: <<'COMMENT'
Run every release step, 00 to 12, in order, and stop at the first failure.

1. Update MINI_ME_VERSION, PREVIOUS_TAG, TAG and ABOUT in release.env
2. Run this script: ./release-all.sh
   - YES=1 ./release-all.sh       to skip the diff check after 00
   - FROM=03 ./release-all.sh     to resume from a given step after a failure
   - DOCKER_HUB_NAMESPACE / SIGN are passed through to the publish scripts
COMMENT

set -euo pipefail

cd "$(dirname "$0")"

FROM="${FROM:-00}"

for script in [0-9][0-9]-*.sh; do
	step="${script%%-*}"
	# 10# keeps "08" and "09" from being read as octal
	if ((10#${step} < 10#${FROM} || 10#${step} > 12)); then
		continue
	fi

	echo
	echo "▶️  ${script}"
	if ! "./${script}"; then
		echo "❌ ${script} failed"
		echo "💡 Fix it, then resume with: FROM=${step} ./release-all.sh"
		exit 1
	fi

	# 00 only rewrites files: 01 commits and tags them, so look before going on.
	if [ "${step}" = "00" ] && [ "${YES:-0}" != "1" ]; then
		read -r -p "Diff OK, go on with 01 (commit, push, tag)? [y/N] " answer
		if [ "${answer}" != "y" ] && [ "${answer}" != "Y" ]; then
			echo "Stopped after 00. Resume with: FROM=01 ./release-all.sh"
			exit 0
		fi
	fi
done

echo
echo "✅ All steps done"