diff --git a/build.sh b/build.sh deleted file mode 100755 index 1b9e971..0000000 --- a/build.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# Build script for lab-ca with version injection from git tag -git describe --tags --always --dirty > /dev/null 2>&1 -if [ $? -eq 0 ]; then - VERSION=$(git describe --tags --always --dirty) -else - VERSION="dev" -fi - -# Hardcode the version into main.go -sed -i '' "s/^var Version = .*/var Version = \"$VERSION\"/" version.go - -if echo $VERSION | grep -q 'dirty$'; then - echo "Building in development mode, output directory is set to 'build'." - OUTPUT_DIR=build - - # Make sure the output directory exists, create it if it is not - mkdir -p $OUTPUT_DIR -else - echo "Building with version: $VERSION" - OUTPUT_DIR=$GOHOME/bin -fi - -# Build the Lab CA binary with version information -# go build -ldflags "-X main.Version=$VERSION" -o $OUTPUT_DIR/lab-ca -go build -o $OUTPUT_DIR/lab-ca