mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-22 05:28:45 +01:00
Revert changing generated file names based on parameters
It should be handled by a packaging script, not a build script.
This commit is contained in:
parent
54ec2e7bd0
commit
f09b75dafa
9
build.rs
9
build.rs
@ -55,16 +55,11 @@ fn template(
|
|||||||
fn main() -> Result<(), Box<dyn Error>> {
|
fn main() -> Result<(), Box<dyn Error>> {
|
||||||
let variables = init_template();
|
let variables = init_template();
|
||||||
|
|
||||||
template(
|
template(&variables, "assets/manual/bat.1.in", "assets/manual/bat.1")?;
|
||||||
&variables,
|
|
||||||
"assets/manual/bat.1.in",
|
|
||||||
&format!("assets/manual/{}.1", EXECUTABLE_NAME.to_owned()),
|
|
||||||
)?;
|
|
||||||
|
|
||||||
template(
|
template(
|
||||||
&variables,
|
&variables,
|
||||||
"assets/completions/bat.fish.in",
|
"assets/completions/bat.fish.in",
|
||||||
&format!("assets/completions/{}.fish", EXECUTABLE_NAME.to_owned()),
|
"assets/completions/bat.fish",
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
12
ci/before_deploy.bash
vendored
12
ci/before_deploy.bash
vendored
@ -7,10 +7,6 @@ if [[ -z "$PROJECT_NAME" ]]; then
|
|||||||
export PROJECT_NAME="bat"
|
export PROJECT_NAME="bat"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$PROJECT_EXECUTABLE" ]]; then
|
|
||||||
export PROJECT_EXECUTABLE="$PROJECT_NAME"
|
|
||||||
fi
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cargo build --target "$TARGET" --release --verbose
|
cargo build --target "$TARGET" --release --verbose
|
||||||
}
|
}
|
||||||
@ -42,7 +38,7 @@ pack() {
|
|||||||
"${gcc_prefix}"strip "$tempdir/$package_name/$PROJECT_NAME"
|
"${gcc_prefix}"strip "$tempdir/$package_name/$PROJECT_NAME"
|
||||||
|
|
||||||
# manpage, readme and license
|
# manpage, readme and license
|
||||||
cp "assets/manual/$PROJECT_EXECUTABLE.1" "$tempdir/$package_name"
|
cp "assets/manual/bat.1" "$tempdir/$package_name/$PROJECT_NAME.1"
|
||||||
cp README.md "$tempdir/$package_name"
|
cp README.md "$tempdir/$package_name"
|
||||||
cp LICENSE-MIT "$tempdir/$package_name"
|
cp LICENSE-MIT "$tempdir/$package_name"
|
||||||
cp LICENSE-APACHE "$tempdir/$package_name"
|
cp LICENSE-APACHE "$tempdir/$package_name"
|
||||||
@ -51,7 +47,7 @@ pack() {
|
|||||||
# TODO: disabled for now, see issue #372
|
# TODO: disabled for now, see issue #372
|
||||||
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".bash "$tempdir/$package_name/autocomplete/${PROJECT_NAME}.bash-completion"
|
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".bash "$tempdir/$package_name/autocomplete/${PROJECT_NAME}.bash-completion"
|
||||||
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".fish "$tempdir/$package_name/autocomplete"
|
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/"$PROJECT_NAME".fish "$tempdir/$package_name/autocomplete"
|
||||||
cp "assets/completions/$PROJECT_EXECUTABLE.fish" "$tempdir/$package_name/autocomplete"
|
cp "assets/completions/bat.fish" "$tempdir/$package_name/autocomplete/$PROJECT_NAME.fish"
|
||||||
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/_"$PROJECT_NAME" "$tempdir/$package_name/autocomplete"
|
# cp target/"$TARGET"/release/build/"$PROJECT_NAME"-*/out/_"$PROJECT_NAME" "$tempdir/$package_name/autocomplete"
|
||||||
|
|
||||||
# archiving
|
# archiving
|
||||||
@ -112,11 +108,11 @@ make_deb() {
|
|||||||
"${gcc_prefix}"strip "$tempdir/usr/bin/$PROJECT_NAME"
|
"${gcc_prefix}"strip "$tempdir/usr/bin/$PROJECT_NAME"
|
||||||
|
|
||||||
# manpage
|
# manpage
|
||||||
install -Dm644 "assets/manual/$PROJECT_NAME.1" "$tempdir/usr/share/man/man1/$PROJECT_NAME.1"
|
install -Dm644 "assets/manual/bat.1" "$tempdir/usr/share/man/man1/$PROJECT_NAME.1"
|
||||||
gzip --best "$tempdir/usr/share/man/man1/$PROJECT_NAME.1"
|
gzip --best "$tempdir/usr/share/man/man1/$PROJECT_NAME.1"
|
||||||
|
|
||||||
# completions
|
# completions
|
||||||
install -Dm644 "assets/completions/$PROJECT_EXECUTABLE.fish" "$tempdir/usr/share/fish/completions/$PROJECT_NAME.fish"
|
install -Dm644 "assets/completions/bat.fish" "$tempdir/usr/share/fish/completions/$PROJECT_NAME.fish"
|
||||||
|
|
||||||
# readme and license
|
# readme and license
|
||||||
install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md"
|
install -Dm644 README.md "$tempdir/usr/share/doc/$PROJECT_NAME/README.md"
|
||||||
|
Loading…
Reference in New Issue
Block a user