mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-17 11:01:14 -03:00
The problem worked around by commit e4674cd7b5 (.cargo/config.toml:
exclude from tarball, 2025-01-12) is as follows:
our OBS packages are built by doing something like
tar xf $tarball && tar xf $vendor_tarball
except that the tool apparently break when a file is present in
both tarballs.
Our workaround is to not include .cargo/config.toml in the tarball.
The workaround seems too broad. It need not affect all tarballs
but only the ones used by OBS. We want to add xtask aliases to
.cargo/config.toml. They will be used by CMake targets (sphinx-doc),
so they should be available to tarball consumers.
Restrict the scope of the workaround: add back .cargo/config.toml
to the export, and allow opting in to this behavioer by passing a
negative pathspec
build_tools/make_tarball.sh :/!.cargo/config.toml
27 lines
516 B
Bash
Executable File
27 lines
516 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Script to generate a tarball
|
|
# Outputs to $FISH_ARTEFACT_PATH or ~/fish_built by default
|
|
|
|
# Example usage:
|
|
#
|
|
# build_tools/make_tarball.sh :/!.cargo/config.toml
|
|
|
|
# Exit on error
|
|
set -e
|
|
|
|
# Get the version
|
|
VERSION=$(build_tools/git_version_gen.sh)
|
|
|
|
prefix=fish-$VERSION
|
|
path=${FISH_ARTEFACT_PATH:-~/fish_built}/$prefix.tar.xz
|
|
|
|
git archive \
|
|
--prefix="$prefix/" \
|
|
HEAD "$@" |
|
|
xz >"$path"
|
|
|
|
# Output what we did, and the sha256 hash
|
|
echo "Tarball written to $path"
|
|
openssl dgst -sha256 "$path"
|