Skip to content

Commit

Permalink
Merge pull request #2 from bluehorndigital/add-local-repo-as-dependency
Browse files Browse the repository at this point in the history
Register current repo as a package repository
  • Loading branch information
mglaman authored Apr 19, 2021
2 parents 4420514 + 1ce3a3b commit 91c7d17
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2254,6 +2254,8 @@ async function doScript() {
['config', 'minimum-stability', 'dev'],
['config', 'prefer-stable', 'true'],
['config', 'preferred-install', 'dist'],
['config', 'repositories.0', "{\"type\": \"path\", \"url\": \"$GITHUB_WORKSPACE\", \"options\": {\"symlink\": false}}"],
['config', 'repositories.1', 'composer', 'https://packages.drupal.org/8']
// @todo requires composer 2
['require', `drupal/core-dev:${drupalVersion}`, '--dev', '-W']
];
Expand All @@ -2264,9 +2266,6 @@ async function doScript() {
commands.push(['require', extraDependencies]);
}

// @todo allow adding current repo.
// composer config repositories.0 "{\"type\": \"path\", \"url\": \"$GITHUB_WORKSPACE\", \"options\": {\"symlink\": false}}"
// composer config repositories.1 composer https://packages.drupal.org/8
for (command of commands) {
await exec.exec('composer', command, {
cwd: drupalPath,
Expand Down
5 changes: 2 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ async function doScript() {
['config', 'minimum-stability', 'dev'],
['config', 'prefer-stable', 'true'],
['config', 'preferred-install', 'dist'],
['config', 'repositories.0', "{\"type\": \"path\", \"url\": \"$GITHUB_WORKSPACE\", \"options\": {\"symlink\": false}}"],
['config', 'repositories.1', 'composer', 'https://packages.drupal.org/8']
// @todo requires composer 2
['require', `drupal/core-dev:${drupalVersion}`, '--dev', '-W']
];
Expand All @@ -28,9 +30,6 @@ async function doScript() {
commands.push(['require', extraDependencies]);
}

// @todo allow adding current repo.
// composer config repositories.0 "{\"type\": \"path\", \"url\": \"$GITHUB_WORKSPACE\", \"options\": {\"symlink\": false}}"
// composer config repositories.1 composer https://packages.drupal.org/8
for (command of commands) {
await exec.exec('composer', command, {
cwd: drupalPath,
Expand Down

0 comments on commit 91c7d17

Please sign in to comment.