Skip to content

Commit

Permalink
updated nightly.yml, updated root build.gradle
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Dec 8, 2024
1 parent 9cde669 commit 00585e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Setup Gradle Dependencies Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle','**/gradle/wrapper/gradle-wrapper.properties','**/*.properties') }}
key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.properties') }}
- name: Build with Gradle
run: ./gradlew build --stacktrace
# The USERNAME and TOKEN need to correspond to the credential environment variables used in
Expand Down
10 changes: 3 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ plugins {
id "fabric-loom" version "1.7-SNAPSHOT" apply false
}

def isCI = System.getenv("GITHUB_ACTION")
def isRELEASE = System.getenv("GITHUB_RELEASE")
def isGITHU_ACTION = System.getenv("GITHUB_ACTION")
def gitHash() {
String hash = System.getenv("GITHUB_SHA")
if (hash != null) return hash.substring(0,8)
Expand All @@ -29,11 +28,8 @@ subprojects {
it.options.encoding = 'UTF-8'
}

if (isCI) {
if (!isRELEASE){
version = version + "-" + gitHash()
println("Not in CI Release mode")
}
if (isGITHU_ACTION) {
version = version + "-" + gitHash()
println("In CI mode")
}
}

0 comments on commit 00585e3

Please sign in to comment.