Skip to content

Commit

Permalink
hot fix to 0.1.0
Browse files Browse the repository at this point in the history
Signed-off-by: Raj Babu Das <[email protected]>
  • Loading branch information
imrajdas committed Aug 26, 2023
1 parent e3aecb2 commit 4b3d83f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea
main
scripts/*
custom-platforms-0.1.0
custom-platforms-0.1.0
.DS_Store
2 changes: 1 addition & 1 deletion pkg/diffr/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 4 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ custom_tag="0.1.0"

custom_platforms=(
"darwin/amd64"
"darwin/arm64"
"linux/386"
"linux/amd64"
"linux/arm"
Expand All @@ -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

Expand All @@ -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
Expand Down

0 comments on commit 4b3d83f

Please sign in to comment.