|
| 1 | +if get(ENV, "CI", "false") == "true" |
| 2 | + for each in readdir(Base.DEPOT_PATH[1], join = true) |
| 3 | + if endswith(each, "License.txt") && isfile(each) |
| 4 | + @info "License file found" each |
| 5 | + rm(each, force = true) |
| 6 | + @info "License file removed" each |
| 7 | + end |
| 8 | + end |
| 9 | + |
| 10 | + if Sys.islinux() |
| 11 | + dir = joinpath(homedir(), ".LicenseSpring") |
| 12 | + if isdir(dir) |
| 13 | + rm(dir, force = true, recursive = true) |
| 14 | + @info "LicenseSpring cache directory removed" dir |
| 15 | + else |
| 16 | + @warn "LicenseSpring cache directory not found" dir |
| 17 | + end |
| 18 | + elseif Sys.isapple() |
| 19 | + dir = joinpath(homedir(), "Library", "Application Support", "LicenseSpring") |
| 20 | + if isdir(dir) |
| 21 | + rm(dir, force = true, recursive = true) |
| 22 | + @info "LicenseSpring cache directory removed" dir |
| 23 | + else |
| 24 | + @warn "LicenseSpring cache directory not found" dir |
| 25 | + end |
| 26 | + elseif Sys.iswindows() |
| 27 | + dir = joinpath(homedir(), "AppData", "Local", "LicenseSpring") |
| 28 | + if isdir(dir) |
| 29 | + rm(dir, force = true, recursive = true) |
| 30 | + @info "LicenseSpring cache directory removed" dir |
| 31 | + else |
| 32 | + @warn "LicenseSpring cache directory not found" dir |
| 33 | + end |
| 34 | + else |
| 35 | + error("Unsupported OS") |
| 36 | + end |
| 37 | +else |
| 38 | + @warn "This script is intended to be run only in CI" |
| 39 | +end |
0 commit comments