Skip to content

Commit

Permalink
Register current repo as a package repository
Browse files Browse the repository at this point in the history
  • Loading branch information
mglaman committed Apr 19, 2021
1 parent 4420514 commit 1ce3a3b
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 1ce3a3b

Please sign in to comment.