Skip to content

Commit

Permalink
Feature/source
Browse files Browse the repository at this point in the history
  • Loading branch information
stefaanneyts committed Oct 9, 2020
1 parent 6630b62 commit 0c0999a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ public Payload rewriteProviderJson(final Repository repository, final Payload pa
for (String packageVersion : packageVersions.keySet()) {
// TODO: Make this more robust, right now it makes a lot of assumptions and doesn't deal with bad things well
Map<String, Object> versionInfo = (Map<String, Object>) packageVersions.get(packageVersion);
versionInfo.remove(SOURCE_KEY); // TODO: For now don't allow sources, probably should make this configurable?

// STEFAAN: keep source
// versionInfo.remove(SOURCE_KEY); // TODO: For now don't allow sources, probably should make this configurable?

Map<String, Object> distInfo = (Map<String, Object>) versionInfo.get(DIST_KEY);
if (distInfo != null && ZIP_TYPE.equals(distInfo.get(TYPE_KEY))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
"homepage": "http://example.com/author1"
}
],
"source": {
"type": "git",
"url": "https:\/\/git.example.com\/vendor1\/project1.git",
"reference": "48954c0fa210437795be418e708b379598333d0a"
},
"dist": {
"type": "zip",
"url": "http://nexus.repo/base/repo/vendor1/project1/branch1/vendor1-project1-branch1.zip",
Expand All @@ -36,6 +41,11 @@
"license": [
"MIT"
],
"source": {
"type": "git",
"url": "https:\/\/git.example.com\/vendor2\/project1.git",
"reference": "be418e708b379598333d0a48954c0fa210437795"
},
"authors": [
{
"name": "Author 2",
Expand Down

0 comments on commit 0c0999a

Please sign in to comment.