Deployment / Packages repository for nui-sftp.
This repository holds the packaging artefacts (PKGBUILD, Flatpak manifest, AppImage Dockerfile, AppStream metainfo, desktop file, icons reference) and the scripts that update them in lockstep when a new upstream release is cut.
| Path | Purpose |
|---|---|
PKGBUILD |
Source of truth for the Arch / AUR package. |
arch/ |
Git submodule pointing at the AUR repository (aur:nui-sftp). The PKGBUILD is copied here at release time. |
org.nuicpp.nui_sftp.yml |
Flatpak / Flathub manifest. |
org.nuicpp.nui_sftp.metainfo.xml |
AppStream metainfo (descriptions, screenshots, releases). |
appimage/ |
AppImage Dockerfile and helpers. |
windows/ |
Inno Setup script for the Windows installer. |
scripts/build_dmg.sh |
Wraps the macOS app bundle into a disk image. |
scripts/prepare_release.mjs |
Top-level release-prep entrypoint (run with bun). |
scripts/update_scripts/*.mjs |
Per-target updaters invoked by prepare_release.mjs. |
prepare_release.mjs rewrites every per-target file to reference a single
target version. It is idempotent — re-running it for the same version
produces the same output.
bun scripts/prepare_release.mjs --version 1.2.0What it does:
- Clones / fetches the upstream
nui-sftpcheckout undercheckout/and checks out the requested tag. - Updates
PKGBUILD(version, sources, sha256s). - Pulls the GitHub release notes for every tag of
5cript/nui-sftpand regenerates the<releases>section oforg.nuicpp.nui_sftp.metainfo.xml. - Updates
org.nuicpp.nui_sftp.yml— the upstreamnui-sftpgit source, thenui-sftp-frontendarchive URL + sha256, and-DFORCED_PROJECT_VERSION. - Updates the AppImage
Dockerfile.
Review the diff before committing — the network-dependent steps (release notes fetch, frontend tarball sha256) can fail silently and emit warnings without aborting.
The AUR package is shipped through the arch/ submodule, which has its
remote set to ssh://aur@aur.archlinux.org/nui-sftp.git. The release flow is:
- Run
prepare_release.mjs(above) to update the top-levelPKGBUILD. - Run
scripts/copy_pkgbuild_to_arch.sh. The script copies the top-levelPKGBUILDintoarch/, regenerates.SRCINFO, and creates a commit inside the submodule with the standard AUR commit message format (upgpkg: <pkgname> <pkgver>-<pkgrel>). - Inside
arch/,git pushto publish to the AUR. - Back in the deploy repo, commit the updated submodule pointer.
bun scripts/prepare_release.mjs --version 1.2.0
./scripts/copy_pkgbuild_to_arch.sh
git -C arch push
git add arch && git commit -m "Bump arch submodule to 1.2.0"The app lives on Flathub in flathub/org.nuicpp.nui_sftp,
which is checked out here as the flathub/ submodule. Flathub builds whatever manifest is on its
master branch. That manifest takes the AppStream metainfo (with the release notes) from this
repository, the deploy-meta source pinned to a flatpak/<version> tag, so every release needs
that tag too.
Releasing version 1.2.0 to Flathub, after the release branch here is merged:
-
Update
mainand tag the merge commit of the release. The tag is what the Flathub manifest points at, so push it before anything else:git checkout main && git pull git tag -a flatpak/1.2.0 -m flatpak/1.2.0 git push origin flatpak/1.2.0 -
Start a branch in the submodule from Flathub's current
master:git -C flathub fetch origin git -C flathub checkout -b release/1.2.0 origin/master
-
Copy the manifest over. The script refuses to run unless the deploy repository's
HEADis exactly at aflatpak/*tag; if there are commits on top already, run it from the tag withgit checkout flatpak/1.2.0and go back tomainafterwards../scripts/copy_manifest_to_flathub.sh
It copies
org.nuicpp.nui_sftp.ymlintoflathub/, pinsdeploy-metato the tag and its commit and commits "Update to 1.2.0" in the submodule. Look over that commit before pushing. -
Push the branch and open a pull request against
masteron flathub/org.nuicpp.nui_sftp:git -C flathub push -u origin release/1.2.0
Flathub's bot builds the pull request and links a test build. Install it and check that the app starts before merging.
-
Merge the pull request. Flathub then builds
masterand publishes the update, which takes a few hours to show up for users. -
Record the new submodule commits here, together with the AUR one (see above), and push:
git add arch flathub git commit -m "Submodule Updates from 1.2.0" git push origin main
- AppImage —
appimage/Dockerfileis updated byprepare_release.mjs; the actual build runs in CI.
windows/nui-sftp.iss is an Inno Setup script that wraps the portable zip's
file tree into a per-machine installer with Start Menu / optional desktop /
optional PATH integration. Upgrades are handled automatically by Inno Setup's
stable AppId mechanism. No special migration logic is needed across
releases.
prepare_release.mjs updates the MyAppVersion literal inside the .iss so
it stays in lockstep with PKGBUILD's pkgver and the Flatpak manifest's
FORCED_PROJECT_VERSION. The CI workflow overrides it via ISCC's /D flag at
build time; the literal only matters for ad-hoc local invocations.
The local build expects the main scp repo
to be checked out as a sibling of this repo (i.e. ../nui-sftp/). Inside the
scp checkout, run a Windows build (MSYS2 clang64, see scp's
.github/workflows/windows.yml) and then bash scripts/deploy.sh to stage
the install tree at ../nui-sftp/build/install.
Then, from this repo:
./scripts/build_installer.sh --version 1.2.3The script auto-locates ISCC.exe (Inno Setup 6) and writes the installer to
build/nui-sftp-windows-x86_64_<version>-setup.exe. Install Inno Setup with
winget install JRSoftware.InnoSetup if missing.
There is no per-release file to update for macOS: the workflow reads the version from
PKGBUILD, builds nui-sftp with -DFORCED_PROJECT_VERSION (which also lands in the bundle's
Info.plist), runs nui-sftp's scripts/deploy.sh to assemble the ad-hoc signed nui-sftp.app
and wraps it into nui-sftp-macos-arm64_<version>.dmg. On main the image is uploaded to the
GitHub release and to S4 under macos/arm64/.
nui-sftp is compiled with Homebrew's llvm@23 instead of AppleClang. Its
scripts/macos/build_dependencies.sh builds libc++ and all libraries statically for macOS 15.2
(cached between runs), so the app links nothing but the OS and the runner's macOS version does not
matter.
On a Mac, with nui-sftp checked out as a sibling and bash scripts/deploy.sh run there:
./scripts/build_dmg.sh --version 1.2.3The image lands in build/.
scripts/build_flatpak.sh invokes
org.flatpak.Builder (the Flathub-blessed builder, installed as a Flatpak)
against org.nuicpp.nui_sftp.yml. The output bundle lands at
build/nui-sftp.flatpak.
./scripts/build_flatpak.sh
flatpak install --user --reinstall build/nui-sftp.flatpak
flatpak run org.nuicpp.nui_sftpscripts/debug_flatpak.sh opens a shell inside
the installed sandbox, useful for inspecting the deployed file layout under
/app.