Revert "Split release publishing into a separate public distribution repo"
This reverts commit 1d2246c5e2.
This commit is contained in:
+16
-21
@@ -1,21 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
# Builds and packages a tagged release. Used by .github/workflows/release.yml; safe to
|
||||
# run locally too for a dry run. Does NOT touch manifest.json -- that's published
|
||||
# separately to the public distribution repo by dev/publish-manifest.sh, since the zip
|
||||
# this produces gets uploaded there too (release assets on a private repo can't be made
|
||||
# public on their own in Gitea; see PLAN.md "Release distribution").
|
||||
# Builds, packages, and updates manifest.json for a tagged release. Used by
|
||||
# .github/workflows/release.yml; safe to run locally too for a dry run.
|
||||
#
|
||||
# Required env vars:
|
||||
# VERSION -- e.g. 0.2.0.0 (must match build.yaml's version)
|
||||
# SERVER_URL -- e.g. https://gitea.mrcynic.site
|
||||
# PUBLIC_REPO_OWNER -- Gitea org/user the *public* distribution repo lives under
|
||||
# PUBLIC_REPO_NAME -- the public distribution repo's name (holds releases + manifest.json)
|
||||
# VERSION -- e.g. 0.2.0.0 (must match build.yaml's version)
|
||||
# SERVER_URL -- e.g. https://gitea.mrcynic.site
|
||||
# REPO_OWNER -- Gitea org/user the repo lives under
|
||||
# REPO_NAME -- Gitea repo name
|
||||
set -euo pipefail
|
||||
|
||||
: "${VERSION:?VERSION env var required, e.g. 0.2.0.0}"
|
||||
: "${SERVER_URL:?SERVER_URL env var required, e.g. https://gitea.mrcynic.site}"
|
||||
: "${PUBLIC_REPO_OWNER:?PUBLIC_REPO_OWNER env var required}"
|
||||
: "${PUBLIC_REPO_NAME:?PUBLIC_REPO_NAME env var required}"
|
||||
: "${REPO_OWNER:?REPO_OWNER env var required}"
|
||||
: "${REPO_NAME:?REPO_NAME env var required}"
|
||||
|
||||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
@@ -37,17 +34,15 @@ rm -f "$ZIP_PATH"
|
||||
(cd src/JellyfinSyncPlus/bin/Release/net9.0 && zip -j "$ROOT/$ZIP_PATH" JellyfinSyncPlus.dll)
|
||||
|
||||
CHECKSUM=$(md5sum "$ZIP_PATH" | awk '{print $1}')
|
||||
SOURCE_URL="${SERVER_URL}/${PUBLIC_REPO_OWNER}/${PUBLIC_REPO_NAME}/releases/download/v${VERSION}/${ZIP_NAME}"
|
||||
SOURCE_URL="${SERVER_URL}/${REPO_OWNER}/${REPO_NAME}/releases/download/v${VERSION}/${ZIP_NAME}"
|
||||
|
||||
python3 "$ROOT/dev/update_manifest.py" \
|
||||
--build-yaml "$ROOT/build.yaml" \
|
||||
--manifest "$ROOT/manifest.json" \
|
||||
--version "$VERSION" \
|
||||
--checksum "$CHECKSUM" \
|
||||
--source-url "$SOURCE_URL"
|
||||
|
||||
echo "Packaged $ZIP_PATH"
|
||||
echo "Checksum: $CHECKSUM"
|
||||
echo "Source URL: $SOURCE_URL"
|
||||
|
||||
# For the next workflow step to pick up without re-deriving them (no-op outside CI).
|
||||
if [ -n "${GITHUB_OUTPUT:-}" ]; then
|
||||
{
|
||||
echo "CHECKSUM=${CHECKSUM}"
|
||||
echo "SOURCE_URL=${SOURCE_URL}"
|
||||
echo "ZIP_PATH=${ZIP_PATH}"
|
||||
} >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user