summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authordiogo464 <[email protected]>2024-02-04 05:54:15 +0000
committerdiogo464 <[email protected]>2024-02-04 05:54:15 +0000
commite1368299e2437e6ecb42584eb6f30d5ca514af4e (patch)
tree94b78828dd18fbe97e33a6ed54fb5596cd376a05 /build.sh
parentf0ec9e9ddb45c6fc1227e9b92bbc462ab6141a3d (diff)
version 1.0.0
Diffstat (limited to 'build.sh')
-rw-r--r--build.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/build.sh b/build.sh
new file mode 100644
index 0000000..ff61f80
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,19 @@
1#!/usr/bin//sh
2
3VERSION=${VERSION:-$(git describe --tags)}
4if [ "$VERSION" = "" ]; then
5 echo "No VERSION"
6 exit 1
7fi
8
9mkdir -p dist
10rustup target install x86_64-unknown-linux-musl || exit 1
11cargo build --release --target-dir target --target x86_64-unknown-linux-musl || exit 1
12mv target/x86_64-unknown-linux-musl/release/rust-hexdump dist/ || exit 1
13rpm-assembler \
14 --name rust-hexdump \
15 --summary "hexdump a rust slice" \
16 --version $VERSION \
17 --arch x86_64 \
18 dist/rust-hexdump:/usr/bin/rust-hexdump:0755 || exit 1
19mv *.rpm dist/ || exit 1