Skip to content

Commit

Permalink
fix on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
joshday committed Dec 13, 2024
1 parent 7757d70 commit 8ecad39
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
10 changes: 8 additions & 2 deletions src/DepotDelivery.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ module DepotDelivery
eval(Expr(:public, :build))
end

@static if Sys.iswindows()
delim = ';'
else
delim = ':'
end

#-----------------------------------------------------------------------------# build
"""
build(src = pwd(), dest=mktempdir(); triplet, platform, verbose, precompiled)
Expand All @@ -23,7 +29,7 @@ Example:
depot_path = build("/path/to/your/project")
"""
function build(
src::String = pwd(), # paths separated with ':'
src::String = pwd(), # paths separated with ':' (';' on Windows)
dest::String = joinpath(mktempdir(), "depot");
triplet = nothing,
platform = Base.BinaryPlatforms.HostPlatform(),
Expand All @@ -38,7 +44,7 @@ function build(
read(cmd, String)
end

build(sources::Vector{String}, dest::String=joinpath(mktempdir(), "depot"); kw...) = build(join(sources, ':'), dest; kw...)
build(sources::Vector{String}, dest::String=joinpath(mktempdir(), "depot"); kw...) = build(join(sources, delim), dest; kw...)



Expand Down
3 changes: 2 additions & 1 deletion src/build_script.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ get_project_name(path) = (p = get_project(path); isnothing(p.name) ? splitpath(p
#-----------------------------------------------------------------------------# ARGS
verbose = verbose == "true"
offline = offline == "true"
source_dict = Dict(x => get_project_name(x) for x in abspath.(split(sources, ':')))
delim = Base.Sys.iswindows() ? ';' : ':'
source_dict = Dict(x => get_project_name(x) for x in abspath.(split(sources, delim)))
platform = Base.parse(Base.BinaryPlatforms.Platform, triplet)

for src in keys(source_dict)
Expand Down

2 comments on commit 8ecad39

@joshday
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/121369

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.0 -m "<description of version>" 8ecad39bcae23867780ec211d06e6018888924c1
git push origin v0.2.0

Please sign in to comment.