-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpackage.bash
More file actions
29 lines (19 loc) · 784 Bytes
/
package.bash
File metadata and controls
29 lines (19 loc) · 784 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash
extension=""
if [[ "$OS" = "Windows_NT" ]]; then
extension=".exe"
fi
set -exo pipefail
triple=$(rustup show | head -n1 | cut -d ' ' -f3 || true) # crashes in windows for some reason, but still gives output
mkdir -p package
cargo build
version=$(cargo run -- --version | sed s/cmdipass-//)
keybase sign -d -i target/debug/cmdipass$extension -o target/debug/cmdipass$extension.sig.saltpack
keybase pgp sign -d -i target/debug/cmdipass$extension -o target/debug/cmdipass$extension.sig.pgp
if [ "$OS" == "Windows_NT" ]; then
pushd target/debug
7z a -mx=1 ../../package/cmdipass-$version-$triple.zip cmdipass.exe*
popd
else
zip -j -1 package/cmdipass-$version-$triple.zip target/debug/cmdipass target/debug/cmdipass.sig.pgp target/debug/cmdipass.sig.saltpack
fi