From 4b3d83fc2b3f99341a7e7c8c361f4a592185f473 Mon Sep 17 00:00:00 2001 From: Raj Babu Das Date: Sun, 27 Aug 2023 00:21:40 +0530 Subject: [PATCH] hot fix to 0.1.0 Signed-off-by: Raj Babu Das --- .gitignore | 3 ++- pkg/diffr/handler.go | 2 +- scripts/build.sh | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index bdcb548..6d18828 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .idea main scripts/* -custom-platforms-0.1.0 \ No newline at end of file +custom-platforms-0.1.0 +.DS_Store \ No newline at end of file diff --git a/pkg/diffr/handler.go b/pkg/diffr/handler.go index 853079b..ad70175 100644 --- a/pkg/diffr/handler.go +++ b/pkg/diffr/handler.go @@ -132,13 +132,13 @@ func handler(w http.ResponseWriter, r *http.Request) { } // Execute the templates with the provided data + w.WriteHeader(http.StatusOK) err := tmpl.Execute(w, data) if err != nil { w.WriteHeader(http.StatusInternalServerError) http.Error(w, err.Error(), http.StatusInternalServerError) return } - w.WriteHeader(http.StatusOK) }() wg.Wait() diff --git a/scripts/build.sh b/scripts/build.sh index 3aa3aff..6c85fe0 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -10,6 +10,7 @@ custom_tag="0.1.0" custom_platforms=( "darwin/amd64" + "darwin/arm64" "linux/386" "linux/amd64" "linux/arm" @@ -26,7 +27,7 @@ do CUSTOM_GOOS=${platform_split[0]} CUSTOM_GOARCH=${platform_split[1]} echo 'Building' $CUSTOM_GOOS-$CUSTOM_GOARCH - custom_output_name=$custom_package'-'$CUSTOM_GOOS-$CUSTOM_GOARCH + custom_output_name='diffr-'$CUSTOM_GOOS-$CUSTOM_GOARCH env GOOS=$CUSTOM_GOOS GOARCH=$CUSTOM_GOARCH VERSION=$custom_tag go build -ldflags "-X main.Version=$custom_tag" -v -o custom-platforms-$custom_tag/$custom_output_name $custom_package @@ -35,9 +36,9 @@ do exit 1 fi - custom_bin_name=$custom_package + custom_bin_name='diffr' if [ "$CUSTOM_GOOS" == 'windows' ]; then - custom_bin_name=$custom_package'.exe' + custom_bin_name='diffr.exe' fi cd custom-platforms-$custom_tag