-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from Wraient/Github-actions-cicd
Github Actions CI/CD Implementation test
- Loading branch information
Showing
3 changed files
with
10 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o curd -ldflags="-s -w" -trimpath cmd/curd/main.go | ||
upx --best --ultra-brute curd | ||
outputDir="Build" | ||
mkdir -p "$outputDir" | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "$outputDir/curd" -ldflags="-s -w" -trimpath cmd/curd/main.go | ||
upx --best --ultra-brute "$outputDir/curd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,3 @@ | ||
@echo off | ||
echo Starting the build process... | ||
set GOOS=windows | ||
set GOARCH=amd64 | ||
echo GOOS is set to %GOOS% | ||
echo GOARCH is set to %GOARCH% | ||
echo Building Go application... | ||
tree /F | ||
go build -o curd.exe .\cmd\curd\main.go | ||
if %ERRORLEVEL% NEQ 0 ( | ||
echo Build failed with error level %ERRORLEVEL% | ||
) else ( | ||
echo Build completed successfully! | ||
) | ||
outputDir="Build" | ||
mkdir -p "$outputDir" | ||
GOOS=windows GOARCH=amd64 go build -o "$outputDir/curd.exe" -ldflags "-s -w" ./cmd/curd/main.go |