diff options
Diffstat (limited to 'app/assets/javascripts/packages/details/store/getters.js')
-rw-r--r-- | app/assets/javascripts/packages/details/store/getters.js | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/app/assets/javascripts/packages/details/store/getters.js b/app/assets/javascripts/packages/details/store/getters.js index ede6d39bde7..14e76ac84bd 100644 --- a/app/assets/javascripts/packages/details/store/getters.js +++ b/app/assets/javascripts/packages/details/store/getters.js @@ -1,4 +1,3 @@ -import { generateConanRecipe } from '../utils'; import { PackageType } from '../../shared/constants'; import { getPackageTypeLabel } from '../../shared/utils'; import { NpmManager } from '../constants'; @@ -20,10 +19,8 @@ export const packageIcon = ({ packageEntity }) => { }; export const conanInstallationCommand = ({ packageEntity }) => { - const recipe = generateConanRecipe(packageEntity); - // eslint-disable-next-line @gitlab/require-i18n-strings - return `conan install ${recipe} --remote=gitlab`; + return `conan install ${packageEntity.name} --remote=gitlab`; }; export const conanSetupCommand = ({ conanPath }) => @@ -98,18 +95,19 @@ export const nugetSetupCommand = ({ nugetPath }) => export const pypiPipCommand = ({ pypiPath, packageEntity }) => // eslint-disable-next-line @gitlab/require-i18n-strings - `pip install ${packageEntity.name} --index-url ${pypiPath}`; + `pip install ${packageEntity.name} --extra-index-url ${pypiPath}`; export const pypiSetupCommand = ({ pypiSetupPath }) => `[gitlab] repository = ${pypiSetupPath} username = __token__ password = <your personal access token>`; -export const composerRegistryInclude = ({ composerPath }) => { - const base = { type: 'composer', url: composerPath }; - return JSON.stringify(base); -}; -export const composerPackageInclude = ({ packageEntity }) => { - const base = { [packageEntity.name]: packageEntity.version }; - return JSON.stringify(base); -}; +export const composerRegistryInclude = ({ composerPath, composerConfigRepositoryName }) => + // eslint-disable-next-line @gitlab/require-i18n-strings + `composer config repositories.${composerConfigRepositoryName} '{"type": "composer", "url": "${composerPath}"}'`; + +export const composerPackageInclude = ({ packageEntity }) => + // eslint-disable-next-line @gitlab/require-i18n-strings + `composer req ${[packageEntity.name]}:${packageEntity.version}`; + +export const groupExists = ({ groupListUrl }) => groupListUrl.length > 0; |