mirror of
https://github.com/burrow-dev/burrow-client.git
synced 2026-11-18 17:37:50 -05:00
Brought up to date with the private repository (121071e)
This commit is contained in:
1 parent
01bc0a03da
commit
55f72460f5
8 files changed
+111
-18
No files matched your search
@@ -21,6 +21,14 @@ done
|
||||
[ -d "$flash" ] || { echo "no flash plugin at $flash (BUILDING.md says where to get it)" >&2; exit 1; }
|
||||
|
||||
dist=$here/dist
|
||||
|
||||
# what the download page says each installer is: a line each in dist/RELEASES
|
||||
# ("Burrow-Setup.exe 1.1.1 2026-10-15"), sent up with the installers
|
||||
note_release() {
|
||||
local list=$dist/RELEASES
|
||||
{ awk -v file="$1" '$1 != file' "$list" 2>/dev/null || true; echo "$1 $2 $(date -u +%F)"; } > "$list.new"
|
||||
mv "$list.new" "$list"
|
||||
}
|
||||
work=$(mktemp -d)
|
||||
mkdir -p "$dist"
|
||||
cd "$work"
|
||||
@@ -62,3 +70,4 @@ ln -s /Applications image/Applications
|
||||
rm -f "$dist/Burrow-macos.dmg"
|
||||
hdiutil create -volname Burrow -srcfolder image -ov -format UDZO "$dist/Burrow-macos.dmg"
|
||||
shasum -a 256 "$dist/Burrow-macos.dmg"
|
||||
note_release Burrow-macos.dmg "$(sed -n 's/.*"version": *"\([^"]*\)".*/\1/p' "$here/app/package.json")"
|
||||
@@ -37,6 +37,14 @@ work=$(mktemp -d)
|
||||
trap 'rm -rf "$work"' EXIT
|
||||
mkdir -p "$dist"
|
||||
|
||||
# what the download page says each installer is: a line each in dist/RELEASES
|
||||
# ("Burrow-Setup.exe 1.1.1 2026-10-15"), sent up with the installers
|
||||
note_release() {
|
||||
local list=$dist/RELEASES
|
||||
{ awk -v file="$1" '$1 != file' "$list" 2>/dev/null || true; echo "$1 $2 $(date -u +%F)"; } > "$list.new"
|
||||
mv "$list.new" "$list"
|
||||
}
|
||||
|
||||
# the app as players get it, with the server's address
|
||||
cp -r "$here/app" "$work/app"
|
||||
if [ -n "$server" ]; then
|
||||
@@ -91,6 +99,7 @@ for target in "${targets[@]}"; do
|
||||
nsis=$(cd "$here/installer" && node -e 'require("app-builder-lib/out/toolsets/windows.js").getMakeNsisPath().then(r => console.log(r.path))')
|
||||
NSISDIR=$(dirname "$(dirname "$nsis")") "$nsis" -V2 -DVERSION="$version" -DSOURCE="$win" -DOUTFILE="$dist/Burrow-Setup.exe" \
|
||||
-DICON="$here/tools/icon.ico" -DFILES="$work/files.nsh" "$here/installer/burrow.nsi"
|
||||
note_release Burrow-Setup.exe "$version"
|
||||
;;
|
||||
linux)
|
||||
need "$here/electron/electron"
|
||||
@@ -100,6 +109,9 @@ for target in "${targets[@]}"; do
|
||||
chmod 755 "$work/electron/electron" "$work/electron/chrome-sandbox"
|
||||
builder "$work/electron" --linux --x64
|
||||
cp "$work/out/Burrow-x86_64.AppImage" "$work/out/burrow_amd64.deb" "$work/out/burrow.x86_64.rpm" "$dist/"
|
||||
for file in Burrow-x86_64.AppImage burrow_amd64.deb burrow.x86_64.rpm; do
|
||||
note_release "$file" "$version"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
rm -rf "$work/out"
|
||||
|
||||
+25
-13
@@ -7,8 +7,8 @@
|
||||
# no markdown file of any kind goes public. the public repository has a
|
||||
# history of its own: nothing of this one's
|
||||
# history goes there, so a file that was ever committed here and is private
|
||||
# never shows up in an old public commit. its .gitignore names the private
|
||||
# paths too, so they are not added there by hand either.
|
||||
# never shows up in an old public commit. the public repository's own files
|
||||
# (its README, .gitignore and licence, written there) are left as they are.
|
||||
set -euo pipefail
|
||||
|
||||
name=burrow-client
|
||||
@@ -17,6 +17,9 @@ [email protected]:burrow-dev/$name.git
|
||||
# (Electron, the Flash plugin, the builds)
|
||||
private=()
|
||||
|
||||
# the public repository's own: never replaced or removed from here
|
||||
public_own=(README.md .gitignore LICENSE)
|
||||
|
||||
here=$(cd "$(dirname "$0")/.." && pwd)
|
||||
public=${BURROW_PUBLIC_DIR:-$HOME/burrow-public/$name}
|
||||
push=1
|
||||
@@ -56,21 +59,30 @@ if [ -n "$leaked" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
{
|
||||
cat "$work/.gitignore"
|
||||
printf '\n# kept in the private repository, never here\n'
|
||||
printf '*.md\n'
|
||||
for path in "${private[@]+"${private[@]}"}"; do
|
||||
printf '/%s\n' "$path"
|
||||
done
|
||||
} > "$work/.gitignore.public"
|
||||
mv "$work/.gitignore.public" "$work/.gitignore"
|
||||
rm -f "$work/.gitignore"
|
||||
|
||||
# the public tree becomes exactly this
|
||||
find "$public" -mindepth 1 -maxdepth 1 ! -name .git -exec rm -rf {} +
|
||||
# start from what is on github: changes made there are kept
|
||||
if git -C "$public" fetch -q origin main 2>/dev/null; then
|
||||
git -C "$public" reset -q --hard origin/main
|
||||
fi
|
||||
|
||||
# the public tree becomes exactly this, beside the public repository's own
|
||||
keep=(! -name .git)
|
||||
for name in "${public_own[@]}"; do
|
||||
keep+=(! -name "$name")
|
||||
rm -rf "${work:?}/$name"
|
||||
done
|
||||
find "$public" -mindepth 1 -maxdepth 1 "${keep[@]}" -exec rm -rf {} +
|
||||
cp -a "$work/." "$public/"
|
||||
cd "$public"
|
||||
git add -A
|
||||
# its .gitignore must not hold back a file meant to go public
|
||||
missing=$(cd "$work" && find . -type f | sed 's|^\./||' | sort | comm -23 - <(git -C "$public" ls-files --cached | sort))
|
||||
if [ -n "$missing" ]; then
|
||||
echo "refused: the public .gitignore holds these back ($(echo "$missing" | wc -l) files), e.g.:" >&2
|
||||
echo "$missing" | head -5 >&2
|
||||
exit 1
|
||||
fi
|
||||
if git diff --cached --quiet; then
|
||||
echo "the public copy is already up to date"
|
||||
exit 0
|
||||
|
||||
Reference in new issue
Block a user