mirror of
				https://github.com/taigrr/shorturl
				synced 2025-01-18 04:03:16 -08:00 
			
		
		
		
	
		
			
				
	
	
		
			44 lines
		
	
	
		
			855 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
		
			855 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| echo -n "Version to tag: "
 | |
| read TAG
 | |
| 
 | |
| echo -n "Name of release: "
 | |
| read NAME
 | |
| 
 | |
| echo -n "Desc of release: "
 | |
| read DESC
 | |
| 
 | |
| git tag ${TAG}
 | |
| git push --tags
 | |
| 
 | |
| if [ ! -d ./bin ]; then
 | |
| 	mkdir bin
 | |
| else
 | |
| 	rm -rf ./bin/*
 | |
| fi
 | |
| 
 | |
| echo -n "Building binaries ... "
 | |
| 
 | |
| rice embed-go
 | |
| 
 | |
| GOOS=linux GOARCH=amd64 go build -o ./bin/shorturl-Linux-x86_64 .
 | |
| GOOS=linux GOARCH=arm64 go build -o ./bin/shorturl-Linux-x86_64 .
 | |
| GOOS=darwin GOARCH=amd64 go build -o ./bin/shorturl-Darwin-x86_64 .
 | |
| GOOS=windows GOARCH=amd64 go build -o ./bin/shorturl-Windows-x86_64.exe .
 | |
| 
 | |
| echo "DONE"
 | |
| 
 | |
| echo -n "Uploading binaries ... "
 | |
| 
 | |
| github-release release \
 | |
|     -u prologic -p -r shorturl \
 | |
|     -t ${TAG} -n "${NAME}" -d "${DESC}"
 | |
| 
 | |
| for file in bin/*; do
 | |
|     name="$(echo $file | sed -e 's|bin/||g')"
 | |
|     github-release upload -u prologic -r shorturl -t ${TAG} -n $name -f $file
 | |
| done
 | |
| 
 | |
| echo "DONE"
 |