]> gitweb.hamatoma.de Git - taskx.git/commitdiff
Usage of git repository (composer.json)
authorWinfried Kappeler <winfried.kappeler@infeos.eu>
Tue, 20 Feb 2024 08:58:24 +0000 (09:58 +0100)
committerWinfried Kappeler <winfried.kappeler@infeos.eu>
Tue, 20 Feb 2024 08:58:24 +0000 (09:58 +0100)
SwitchRepo [new file with mode: 0755]
composer.json

diff --git a/SwitchRepo b/SwitchRepo
new file mode 100755 (executable)
index 0000000..9cb8cfb
--- /dev/null
@@ -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
+
index 73c205f98908bf4aa6e662f21dde21d9c932bf42..f8f390795816ccb680a7494b76796ee91bca8263 100644 (file)
     "prefer-stable": true,
     "repositories": {
         "laraknife": {
-            "type": "path",
-            "url": "../laraknife",
-            "options": {
-                "symlink": true
-            }
+            "type": "vcs",
+            "url": "https://github.com/hamatoma/laraknife"
         }
     }
 }