Merge pull request #56 from invenia/cdg/uuids
Use METADATA-compatible UUIDs
This commit is contained in:
commit
1025691088
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2017-2018 Chris de Graaf, Invenia Technical Computing Corporation
|
||||
Copyright (c) 2017-2019 Chris de Graaf, Invenia Technical Computing Corporation
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -18,6 +18,11 @@ function generate(
|
||||
# Create the directory with some boilerplate inside.
|
||||
Pkg.generate(pkg_dir)
|
||||
|
||||
# Replace the UUID with something that's compatible with METADATA.
|
||||
project = joinpath(pkg_dir, "Project.toml")
|
||||
uuid = string(Pkg.METADATA_compatible_uuid(pkg))
|
||||
write(project, replace(read(project, String), r"uuid = .*" => "uuid = \"$uuid\""))
|
||||
|
||||
if git
|
||||
# Initialize the repo.
|
||||
repo = LibGit2.init(pkg_dir)
|
||||
|
Loading…
Reference in New Issue
Block a user