mirror of
https://github.com/tachiyomiorg/tachiyomi-extensions-inspector.git
synced 2024-12-26 00:31:49 +01:00
clean up bulid file name
This commit is contained in:
parent
1a23804e51
commit
eac7436b18
11
.github/scripts/commit-repo.sh
vendored
11
.github/scripts/commit-repo.sh
vendored
@ -4,17 +4,6 @@ cp ../master/repo/server-r* .
|
|||||||
new_build=$(ls | tail -1)
|
new_build=$(ls | tail -1)
|
||||||
echo "New build file name: $new_build"
|
echo "New build file name: $new_build"
|
||||||
|
|
||||||
# every build generates different jar even if same code, so comment this out.
|
|
||||||
#diff $new_build server-latest.jar > /dev/null
|
|
||||||
#if [ $? -eq 1 ]; then
|
|
||||||
# echo "This is different to latest, replace latest."
|
|
||||||
# cp -f $new_build server-latest.jar
|
|
||||||
#else
|
|
||||||
# echo "This is the same as latest, throw it away."
|
|
||||||
# rm $new_build
|
|
||||||
#fi
|
|
||||||
|
|
||||||
|
|
||||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
git config --global user.name "github-actions[bot]"
|
git config --global user.name "github-actions[bot]"
|
||||||
git status
|
git status
|
||||||
|
12
.github/scripts/create-repo.sh
vendored
12
.github/scripts/create-repo.sh
vendored
@ -3,8 +3,12 @@ set -e
|
|||||||
|
|
||||||
mkdir -p repo/
|
mkdir -p repo/
|
||||||
|
|
||||||
revision=$(git rev-list master --count)
|
# Get last commit message
|
||||||
# add zero padding
|
last_commit_log=$(git log -1 --pretty=format:"%s")
|
||||||
revision=$(printf %04d $revision)
|
echo "last commit log: $last_commit_log"
|
||||||
|
|
||||||
cp server/build/server-1.0-all.jar "repo/server-r$revision.jar"
|
filter_count=$(echo "$last_commit_log" | grep -c "[RELEASE CI]" )
|
||||||
|
|
||||||
|
if [ "$filter_count" -gt 0 ]; then
|
||||||
|
cp server/build/Tachidesk-*.jar repo/
|
||||||
|
fi
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -65,7 +65,7 @@ jobs:
|
|||||||
configuration-cache-enabled: true
|
configuration-cache-enabled: true
|
||||||
|
|
||||||
- name: Create repo artifacts
|
- name: Create repo artifacts
|
||||||
if: github.event_name == 'push' && github.repository == 'AriaMoradi/Tachidesk' && "startsWith(github.event.head_commit.message, '[RELEASE CI]')"
|
if: github.event_name == 'push' && github.repository == 'AriaMoradi/Tachidesk'
|
||||||
run: |
|
run: |
|
||||||
cd master
|
cd master
|
||||||
./.github/scripts/create-repo.sh
|
./.github/scripts/create-repo.sh
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
|
import java.io.BufferedReader
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
// id("org.jetbrains.kotlin.jvm") version "1.4.21"
|
// id("org.jetbrains.kotlin.jvm") version "1.4.21"
|
||||||
@ -6,6 +7,8 @@ plugins {
|
|||||||
id("com.github.johnrengelman.shadow") version "6.1.0"
|
id("com.github.johnrengelman.shadow") version "6.1.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val TachideskVersion = "v0.0.1"
|
||||||
|
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -102,6 +105,19 @@ sourceSets {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val TachideskRevision = Runtime
|
||||||
|
.getRuntime()
|
||||||
|
.exec("git rev-list master --count")
|
||||||
|
.let { process ->
|
||||||
|
process.waitFor()
|
||||||
|
val output = process.inputStream.use {
|
||||||
|
it.bufferedReader().use(BufferedReader::readText)
|
||||||
|
}
|
||||||
|
process.destroy()
|
||||||
|
"r"+output.trim()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
jar {
|
jar {
|
||||||
manifest {
|
manifest {
|
||||||
@ -115,12 +131,14 @@ tasks {
|
|||||||
}
|
}
|
||||||
shadowJar {
|
shadowJar {
|
||||||
manifest.inheritFrom(jar.get().manifest) //will make your shadowJar (produced by jar task) runnable
|
manifest.inheritFrom(jar.get().manifest) //will make your shadowJar (produced by jar task) runnable
|
||||||
|
archiveBaseName.set("Tachidesk")
|
||||||
|
archiveVersion.set(TachideskVersion)
|
||||||
|
archiveClassifier.set(TachideskRevision)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType<ShadowJar> {
|
tasks.withType<ShadowJar> {
|
||||||
destinationDir = File("$rootDir/server/build")
|
destinationDir = File("$rootDir/server/build")
|
||||||
//dependsOn(":webUI:copyBuild")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.named("processResources") {
|
tasks.named("processResources") {
|
||||||
|
Loading…
Reference in New Issue
Block a user