Skip to content

Commit f53f4db

Browse files
authored
Merge pull request #27 from simplecloudapp/fix/directory-repository-resource-loading
Fix/directory repository resource loading
2 parents d2fc835 + 704229e commit f53f4db

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

.github/workflows/release-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ jobs:
6060
body: |
6161
This release contains dev builds for all Gradle modules.
6262
env:
63-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ plugins {
66

77
val baseVersion = "0.0.1"
88
val commitHash = System.getenv("COMMIT_HASH")
9-
val snapshotVersion = "${baseVersion}-dev.$commitHash"
9+
val timestamp = System.currentTimeMillis() // Temporary to be able to build and publish directly out of fix branch with same commit hash
10+
val snapshotVersion = "${baseVersion}-dev.${timestamp}-${commitHash}"
1011

1112
allprojects {
1213
group = "app.simplecloud.plugin"

plugin-shared/src/main/kotlin/app/simplecloud/plugin/api/shared/config/repository/DirectoryRepository.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class DirectoryRepository<I : Any, T : Any> constructor(
150150
try {
151151
logger.info("Loading file ${file.name}")
152152
fileHandler.load(file)?.let { entity ->
153+
logger.info("Reached First ${file.name}")
153154
if (validateEntity(entity)) {
154155
logger.info("Reached ${file.name}")
155156
entities[file] = AtomicReference(entity)

plugin-shared/src/main/kotlin/app/simplecloud/plugin/api/shared/config/repository/handler/YamlFileHandler.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class YamlFileHandler<T : Any>(
3535
val node = loader.load()
3636
node.get(clazz)
3737
} catch (e: Exception) {
38+
println("Error loading file ${file.name}: ${e.message}")
39+
e.printStackTrace()
3840
null
3941
}
4042
}

0 commit comments

Comments
 (0)