mirror of
				https://github.com/proxiodev/RedisBungee.git
				synced 2025-10-31 07:48:02 +00:00 
			
		
		
		
	remove all branch stuff
This commit is contained in:
		
							parent
							
								
									fc633910ba
								
							
						
					
					
						commit
						703131a727
					
				
							
								
								
									
										2
									
								
								.github/workflows/maven.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/maven.yml
									
									
									
									
										vendored
									
									
								
							| @ -22,7 +22,7 @@ jobs: | |||||||
|         java-version: '11' |         java-version: '11' | ||||||
|         distribution: 'adopt' |         distribution: 'adopt' | ||||||
|     - name: Build with gradle |     - name: Build with gradle | ||||||
|       run: ./gradlew shadowJar -Dbranch=${{ vars.GITHUB_REF_NAME }} |       run: ./gradlew shadowJar | ||||||
|     - name: Upload Bungee |     - name: Upload Bungee | ||||||
|       uses: actions/upload-artifact@v2.2.3 |       uses: actions/upload-artifact@v2.2.3 | ||||||
|       with: |       with: | ||||||
|  | |||||||
| @ -32,31 +32,15 @@ description = "RedisBungee interafaces" | |||||||
| blossom { | blossom { | ||||||
|     replaceToken("@version@", "$version") |     replaceToken("@version@", "$version") | ||||||
|     // GIT |     // GIT | ||||||
|     var branch: String = "" |  | ||||||
|     var commit: String = "" |     var commit: String = "" | ||||||
|     val branchProp = System.getProperty("branch") |  | ||||||
|     if (branchProp != null) { |  | ||||||
|         branch = branchProp; |  | ||||||
|     } else { |  | ||||||
|         val branchStdout = ByteArrayOutputStream() |  | ||||||
|         rootProject.exec { |  | ||||||
|             standardOutput = branchStdout |  | ||||||
|             commandLine("git", "branch", "--show-current") |  | ||||||
|         } |  | ||||||
|         branch = branchStdout.toString().replace("\n", "") |  | ||||||
|         branchStdout.close() |  | ||||||
|     } |  | ||||||
|     val commitStdout = ByteArrayOutputStream() |     val commitStdout = ByteArrayOutputStream() | ||||||
|     rootProject.exec { |     rootProject.exec { | ||||||
|         standardOutput = commitStdout |         standardOutput = commitStdout | ||||||
|         commandLine("git", "rev-parse", "HEAD") |         commandLine("git", "rev-parse", "HEAD") | ||||||
|     } |     } | ||||||
|     commit = "$commitStdout".replace("\n", ""); |     commit = "$commitStdout".replace("\n", "") // for some reason it adds new line so remove it. | ||||||
|     commitStdout.close() |     commitStdout.close() | ||||||
| 
 |  | ||||||
|     replaceToken("@git_branch@", branch) |  | ||||||
|     replaceToken("@git_commit@", commit) |     replaceToken("@git_commit@", commit) | ||||||
| 
 |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| java { | java { | ||||||
|  | |||||||
| @ -3,7 +3,10 @@ package com.imaginarycode.minecraft.redisbungee; | |||||||
| public class Constants { | public class Constants { | ||||||
| 
 | 
 | ||||||
|     public final static String VERSION = "@version@"; |     public final static String VERSION = "@version@"; | ||||||
|     public final static String GIT_BRANCH = "@git_branch@"; |  | ||||||
|     public final static String GIT_COMMIT = "@git_commit@"; |     public final static String GIT_COMMIT = "@git_commit@"; | ||||||
| 
 | 
 | ||||||
|  |     public static String getGithubCommitLink() { | ||||||
|  |         return "https://github.com/ProxioDev/RedisBungee/commit/" + GIT_COMMIT; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user