Skip to content

Commit 3307011

Browse files
authored
Merge pull request #4 from 9ITHON/ci/1
ci/cd 파일 수정
2 parents 8164318 + d0c6828 commit 3307011

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

demo-api/build.gradle

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,28 @@ test {
2626
}
2727

2828
asciidoctor {
29-
sourceDir = file('src/docs/asciidoc') // 👈 index.adoc 위치 지정
29+
// sourceDir, outputDir 등 기존 설정 유지
30+
sourceDir = file('src/docs/asciidoc')
3031
outputDir = file("$buildDir/docs/asciidoc")
31-
inputs.dir snippetsDir
32-
dependsOn test
3332

34-
attributes 'snippets': snippetsDir.absolutePath
33+
// snippetsDir가 있을 때만 inputs.dir 등록
34+
if (snippetsDir.exists()) {
35+
inputs.dir snippetsDir
36+
attributes 'snippets': snippetsDir.absolutePath
37+
} else {
38+
// 디렉터리가 없으면 attributes 설정 제거 또는 기본값 사용 가능
39+
attributes 'snippets': ''
40+
}
41+
42+
dependsOn test
3543
baseDirFollowsSourceDir()
44+
// sourceDir = file('src/docs/asciidoc') // 👈 index.adoc 위치 지정
45+
// outputDir = file("$buildDir/docs/asciidoc")
46+
// inputs.dir snippetsDir
47+
// dependsOn test
48+
//
49+
// attributes 'snippets': snippetsDir.absolutePath
50+
// baseDirFollowsSourceDir()
3651
}
3752

3853

@@ -49,7 +64,7 @@ build {
4964

5065
bootJar {
5166
enabled = true
52-
dependsOn asciidoctor
67+
dependsOn asciidoctora
5368
from('build/docs/asciidoc') {
5469
into 'static/docs'
5570
}

0 commit comments

Comments
 (0)