mirror of
				https://github.com/yggdrasil-network/yggdrasil-go.git
				synced 2025-11-04 03:05:07 +03:00 
			
		
		
		
	Add branch name into repo name
This commit is contained in:
		
							parent
							
								
									3c1e00f23f
								
							
						
					
					
						commit
						674830799d
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -10,15 +10,19 @@ then
 | 
				
			||||||
  exit -1
 | 
					  exit -1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PKGNAME=yggdrasil
 | 
					PKGBRANCH=$(basename `git name-rev --name-only HEAD`)
 | 
				
			||||||
 | 
					if [ "$PKGBRANCH" = "master" ]; then PKGNAME=yggdrasil
 | 
				
			||||||
 | 
					else PKGNAME=yggdrasil-${PKGBRANCH}; fi
 | 
				
			||||||
PKGARCH=${PKGARCH-amd64}
 | 
					PKGARCH=${PKGARCH-amd64}
 | 
				
			||||||
PKGVERSION=0.$(git rev-list HEAD --count 2>/dev/null | xargs printf "%04d")
 | 
					PKGVERSION=0.$(git rev-list HEAD --count 2>/dev/null | xargs printf "%04d")
 | 
				
			||||||
PKGFILE=$PKGNAME-$PKGVERSION-$PKGARCH.deb
 | 
					PKGFILE=$PKGNAME-$PKGVERSION-$PKGARCH.deb
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ $PKGARCH = "amd64" ]; then GOARCH=amd64 GOOS=linux ./build
 | 
					if [ $PKGARCH = "amd64" ]; then GOARCH=amd64 GOOS=linux ./build
 | 
				
			||||||
elif [ $PKGARCH = "i386" ]; then GOARCH=386 GOOS=linux ./build
 | 
					elif [ $PKGARCH = "i386" ]; then GOARCH=386 GOOS=linux ./build
 | 
				
			||||||
 | 
					elif [ $PKGARCH = "mipsel" ]; then GOARCH=mipsle GOOS=linux ./build
 | 
				
			||||||
 | 
					elif [ $PKGARCH = "mips" ]; then GOARCH=mips64 GOOS=linux ./build
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
  echo "Specify PKGARCH=amd64 or PKGARCH=i386"
 | 
					  echo "Specify PKGARCH=amd64,i386,mips,mipsel"
 | 
				
			||||||
  exit -1
 | 
					  exit -1
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue