Merge pull request #56 from invenia/cdg/uuids

Use METADATA-compatible UUIDs
This commit is contained in:
Chris de Graaf 2019-02-05 12:27:41 -06:00 committed by GitHub
commit 1025691088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal 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. # Create the directory with some boilerplate inside.
Pkg.generate(pkg_dir) 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 if git
# Initialize the repo. # Initialize the repo.
repo = LibGit2.init(pkg_dir) repo = LibGit2.init(pkg_dir)