Something went wrong. Try again.
Zig bindings for all 506 operations of the Forgejo API, generated from its own description, and zfj, a command line built on them.
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859# SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us># SPDX-License-Identifier: MIT
# What a release publishes: an archive per cross-built target --# `zfj-<version>-<target>.zip` for Windows, `.tar.gz` otherwise, each a# directory of that name holding the binary, the README and the license --# the Windows installer, and SHA256SUMS over them. The archives are made# reproducibly, so that the same commit gives the same sums; the MSI is not# (see ADR 0004).{ lib, runCommand, gnutar, gzip, zip, builds, msi,}:let version = (builtins.head builds).version; archive = build: let name = "zfj-${version}-${build.target}"; windows = lib.hasInfix "windows" build.target; exe = if windows then "zfj.exe" else "zfj"; in '' mkdir -p staging/${name}/LICENSES cp ${build}/bin/${exe} staging/${name}/${exe} cp ${./README.md} staging/${name}/README.md cp ${./LICENSES/MIT.txt} staging/${name}/LICENSES/MIT.txt mkdir staging/${name}/completions cp ${./src/cli/completions}/* staging/${name}/completions/ chmod -R u+w,go-w staging/${name} find staging/${name} -exec touch -h -d @1 {} + ${ if windows then ''(cd staging && TZ=UTC zip -X -r -q "$out/${name}.zip" ${name})'' else ''tar --sort=name --mtime=@1 --owner=0 --group=0 --numeric-owner -C staging -cf - ${name} | gzip -9 -n > "$out/${name}.tar.gz"'' } '';inrunCommand "zfj-release-${version}" { nativeBuildInputs = [ gnutar gzip zip ]; } '' mkdir -p $out ${lib.concatMapStrings archive builds} cp ${msi}/*.msi $out/ (cd $out && sha256sum *.zip *.tar.gz *.msi > SHA256SUMS) ''