Skip to content

Commit

Permalink
Version arg
Browse files Browse the repository at this point in the history
  • Loading branch information
pycanis committed Sep 15, 2024
1 parent 2229c8e commit d319046
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,24 @@
#!/bin/bash

version=$1

if [ -z "$version" ]; then
echo "Error: No version argument provided."
exit 1
fi

# ARM64 darwin
cargo build --release

APP_NAME="lnrecc"
VERSION="v1.0.0"
ARCHIVE_NAME="releases/${APP_NAME}-darwin-arm64-${VERSION}.tar.gz"
ARCHIVE_NAME="releases/${APP_NAME}-darwin-arm64-${version}.tar.gz"

tar -czvf $ARCHIVE_NAME -C target/release $APP_NAME

# AMD64 linux

BUILD_IMAGE_NAME="lnrecc-build"
ARCHIVE_NAME="releases/${APP_NAME}-linux-amd64-${VERSION}.tar.gz"
ARCHIVE_NAME="releases/${APP_NAME}-linux-amd64-${version}.tar.gz"

docker build -f Dockerfile-build -t ${BUILD_IMAGE_NAME} --platform linux/amd64 .

Expand Down

0 comments on commit d319046

Please sign in to comment.