From b699f1a6433ae53e5fa3d3a671b8d20929387ed8 Mon Sep 17 00:00:00 2001 From: Sung Won Cho Date: Tue, 12 Nov 2019 13:20:43 +0800 Subject: [PATCH] Properly embed static files into binary (#309) * Properly embed static files into binary * Document change --- CHANGELOG.md | 7 +++++++ scripts/server/build.sh | 7 ++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed960bc8..130664ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,13 @@ All notable changes to the projects under this repository will be documented in The following log documents the history of the server project. +### 0.3.1 - 2019-11-12 + +#### Fixed + +- Fix static files not being embedded in the binary. (#309) +- Fix mobile menu not covering the whole screen. (#308) + ### 0.3.0 - 2019-11-12 #### Added diff --git a/scripts/server/build.sh b/scripts/server/build.sh index 6eec732e..b8c3d507 100755 --- a/scripts/server/build.sh +++ b/scripts/server/build.sh @@ -29,6 +29,8 @@ build() { platform=$1 arch=$2 + pushd "$basedir" + destDir="$outputDir/$platform-$arch" mkdir -p "$destDir" @@ -39,10 +41,12 @@ build() { GOARCH="$arch" go build \ -o "$destDir/dnote-server" \ -ldflags "-X main.versionTag=$version" \ - "$projectDir"/pkg/server/*.go + "$basedir"/*.go packr2 clean + popd + # build tarball tarballName="dnote_server_${version}_${platform}_${arch}.tar.gz" tarballPath="$outputDir/$tarballName" @@ -56,6 +60,7 @@ build() { pushd "$outputDir" shasum -a 256 "$tarballName" >> "$outputDir/dnote_${version}_checksums.txt" popd + } build linux amd64