From: Winfried Kappeler Date: Tue, 20 Feb 2024 08:58:24 +0000 (+0100) Subject: Usage of git repository (composer.json) X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=719cbec897214060114bff349d6dc93386a95193;p=taskx.git Usage of git repository (composer.json) --- diff --git a/SwitchRepo b/SwitchRepo new file mode 100755 index 0000000..9cb8cfb --- /dev/null +++ b/SwitchRepo @@ -0,0 +1,17 @@ +#! /bin/bash +MODE=$1 +if [ "$MODE" != 'git' -a "$MODE" != 'local' ]; then + echo "+++ unknown MODE, expecting 'git' or 'local'" + echo "Example: SwitchRepo git" +fi +function Switch(){ + composer config --unset repositories.vendor/laraknife + grep -i "repository" composer.json + if [ "$MODE" = git ]; then + composer config repositories.laraknife vcs https://github.com/hamatoma/laraknife + else + composer config repositories.laraknife '{"type": "path", "url": "../laraknife", "options": {"symlink": true}}' + fi +} +Switch + diff --git a/composer.json b/composer.json index 73c205f..f8f3907 100644 --- a/composer.json +++ b/composer.json @@ -68,11 +68,8 @@ "prefer-stable": true, "repositories": { "laraknife": { - "type": "path", - "url": "../laraknife", - "options": { - "symlink": true - } + "type": "vcs", + "url": "https://github.com/hamatoma/laraknife" } } }