Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Commit

Permalink
simplyfing dir delete, fixing binary executable permission
Browse files Browse the repository at this point in the history
  • Loading branch information
mageddo committed May 4, 2020
1 parent bf040ad commit a6196ed
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
3 changes: 3 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 3.5.2
* Fixing binary executable permission

# 3.5.1
* Generating native-image binary

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.5.1
3.5.2
19 changes: 3 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import java.nio.file.Files
import java.nio.file.Paths
import java.time.LocalDateTime
import java.util.concurrent.Executors
Expand Down Expand Up @@ -134,7 +133,7 @@ task copyStatics() {
def binFilePath = "${project.buildDir}/native-image/"
def distPath = Paths.get("${binFilePath}/dist")

deleteRecursively(distPath)
ant.delete(dir: "${distPath}")

/**
* Copying static files
Expand All @@ -151,24 +150,12 @@ task copyStatics() {
* Create a distribution file
*/
ant.zip(destfile: "${distPath}/${project.name}.zip") {
zipfileset("dir": binFilePath)
zipfileset(dir: binFilePath, filemode: "755", includes: project.name)
zipfileset(dir: binFilePath, excludes: project.name)
}
}
}

static void deleteRecursively(java.nio.file.Path distPath) {
Files.createDirectories(distPath)
Files.walk(distPath)
.sorted(Comparator.reverseOrder())
.forEach({
try {
Files.deleteIfExists(it)
} catch (IOException e) {
throw new UncheckedIOException(e)
}
})
}

task heartbeat() {
doLast() {
Executors.newSingleThreadExecutor().submit({
Expand Down

0 comments on commit a6196ed

Please # to comment.