chore: tweak tests so they run faster
[ouch.git] / scripts / package-release-assets.sh
blobc2e1ba9cb762f29a909bd4637aacb5939161f81b
1 #!/usr/bin/env bash
3 set -e
5 mkdir release
6 cd artifacts
8 for dir in ouch-*; do
9 cp -r "$dir/artifacts" "$dir/completions"
10 mkdir "$dir/man"
11 mv "$dir"/completions/*.1 "$dir/man"
13 cp ../{README.md,LICENSE,CHANGELOG.md} "$dir"
14 rm -r "$dir/artifacts"
16 if [[ "$dir" = *.exe ]]; then
17 target=${dir%.exe}
18 mv "$dir/target/${target/ouch-/}/release/ouch.exe" "$dir"
19 rm -r "$dir/target"
20 mv "$dir" "$target"
21 zip -r "../release/$target.zip" "$target"
22 else
23 mv "$dir/target/${dir/ouch-/}/release/ouch" "$dir"
24 rm -r "$dir/target"
25 chmod +x "$dir/ouch"
26 tar czf "../release/$dir.tar.gz" "$dir"
28 done