Use METADATA-compatible UUIDs

This commit is contained in:
Chris de Graaf 2019-02-05 09:20:48 -06:00
parent 51e48fc6b1
commit 8a1b65a34a
2 changed files with 6 additions and 1 deletions

View File

@ -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

View File

@ -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)