Skip to content

Commit

Permalink
Remove the git short revision in the version because its kind of anno…
Browse files Browse the repository at this point in the history
…ying; fix commit count in version
  • Loading branch information
Michael Ruf committed Jan 9, 2023
1 parent ee85b3c commit 4d831fc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 38 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ jobs:
- name: Check out project
if: success()
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up JDK 17
if: success()
Expand Down
44 changes: 6 additions & 38 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@ plugins {
allprojects {
// This can get extracted into a root build.gradle if needed
ext {
getCurrentShortRevision = {
// Got from https://github.com/PaperMC/Velocity/blob/dev/3.0.0/build.gradle
new ByteArrayOutputStream().withStream { os ->
exec {
executable = "git"
args = ["rev-parse", "HEAD"]
standardOutput = os
}
return os.toString().trim().substring(0, 8)
}
}

getLatestTag = {
new ByteArrayOutputStream().withStream { os ->
exec {
Expand All @@ -42,8 +30,8 @@ allprojects {
}

try {
project.version = "${project.ext.getLatestTag()}-${project.ext.getCurrentCommitCount()}-${project.ext.getCurrentShortRevision()}"
} catch(Exception ignored) {
project.version = "${project.ext.getLatestTag()}-${project.ext.getCurrentCommitCount()}"
} catch (Exception ignored) {
println('Either git is not set up properly, or there is no tag yet in the repository. Falling back to version \'0\'')
project.version = '0'
}
Expand All @@ -53,7 +41,7 @@ allprojects {
repositories {
mavenCentral()
maven { url 'https://maven.wispforest.io' } // Owo config
maven { url = 'https://maven.kyrptonaught.dev' } // Custom portal api
maven { url 'https://maven.kyrptonaught.dev' } // Custom portal api
maven { url 'https://maven.nucleoid.xyz' } // Custom portal api transitive
}

Expand All @@ -69,30 +57,10 @@ dependencies {
// Owo config
annotationProcessor modImplementation('io.wispforest:owo-lib:0.9.2+1.19')

// // Custom portal api
// // This is included in the cpa-polymer
// //modImplementation 'net.kyrptonaught:customportalapi:0.0.1-beta57-1.19'
// //include 'net.kyrptonaught:customportalapi:0.0.1-beta57-1.19'
// modImplementation 'net.kyrptonaught:customportalapi:0.0.1-beta54-1.19'
// include 'net.kyrptonaught:customportalapi:0.0.1-beta54-1.19'
// // Custom portal api polymer (support for vanilla)
// // Getting from maven 'net.kyrptonaught:cpa-polymer:1.0.0-1.19' gives an error
// //modImplementation 'net.kyrptonaught:cpa-polymer:1.0.0-1.19'
// //include 'net.kyrptonaught:cpa-polymer:1.0.0-1.19'
// // And the version on github is newer anyways
// modImplementation files('lib/cpa-polymer-1.0.0-1.19.jar')
// include 'net.kyrptonaught:cpa-polymer:1.0.0-1.19'
// modImplementation 'eu.pb4:polymer:0.2.18+1.19.2'

// Custom portal api
modImplementation 'net.kyrptonaught:customportalapi:0.0.1-beta54-1.19'
include 'net.kyrptonaught:customportalapi:0.0.1-beta54-1.19'
modImplementation 'net.kyrptonaught:cpa-polymer:1.0.0-1.19'
include 'net.kyrptonaught:cpa-polymer:1.0.0-1.19'
modImplementation 'eu.pb4:polymer:0.2.18+1.19.2'
include 'eu.pb4:polymer:0.2.18+1.19.2'

// TODO At some point, clean up the lib directory and remove this part from gitignore
modImplementation(include('net.kyrptonaught:customportalapi:0.0.1-beta54-1.19'))
modImplementation(include('net.kyrptonaught:cpa-polymer:1.0.0-1.19'))
modImplementation(include('eu.pb4:polymer:0.2.18+1.19.2'))
}

modrinth {
Expand Down
Binary file removed lib/cpa-polymer-1.0.0-1.19.jar
Binary file not shown.

0 comments on commit 4d831fc

Please sign in to comment.