File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -10,10 +10,12 @@ if [[ -z "$package" ]]; then
1010fi
1111package_split=(${package// \/ / } )
1212package_name=${package_split[-1]}
13+ # Remove the .go extension from the final package name
14+ final_name=(${package_name// \. go/ } )
1315build_dir=' builds'
1416platforms=(" linux/amd64" " windows/amd64" " darwin/amd64" )
1517
16- # Check if the build_dir is empty. If not, ask user if they want to clean it
18+ # Check if the build_dir is empty. If not, ask user if they want to clean it.
1719if [ -d $build_dir ]; then
1820 read -p " The build directory is not empty. Do you want to clean it? (yes/no): " clean
1921 if [[ $clean == " yes" ]]; then
2931 platform_split=(${platform// \/ / } )
3032 GOOS=${platform_split[0]}
3133 GOARCH=${platform_split[1]}
32- output_name=$build_dir ' /' $package_name ' -' $GOOS ' - ' $GOARCH
34+ output_name=$build_dir ' /' $GOOS ' -' $GOARCH ' / ' $final_name
3335 if [ $GOOS = " windows" ]; then
3436 output_name+=' .exe'
3537 fi
You can’t perform that action at this time.
0 commit comments