Files
google-apis-rs/src/bash/linux-deploy.bash
Sebastian Thiel 0f61fa4c95 fix(deploy): adjust linux script to target dir
Previously it attempted to find build-artifacts in
the 'gen' directory, now these are all found in
'target', provided cargo 0.3.0 is used.

[skip ci]
2015-06-27 08:56:04 +02:00

10 lines
541 B
Bash
Executable File

#!/bin/bash
echo "NOTE: I assume you have called the respective make cargo-cli ARGS=build beforehand"
version=${1:?First argument must be the version CLI we deploy, like v0.1.0}
rtype=${2:?Second argument is either 'release' or 'debug'}
tar_basename=google-apis-rs_cli-${version}_linux-x86-64_${rtype}
tar_file=${tar_basename}.tar.gz
tar -czf $tar_file --transform "s%^.*/%%" -T <(find target -executable -type f -path "*/${rtype}/*" -not \( -name "*.*" -or -name "*script*" -or -regex ".*-[a-f0-9]{16}" \)) || exit $?
echo Wrote $tar_file