Commit 3b13db12 authored by Kosta Harlan's avatar Kosta Harlan Committed by Brennen Bearnes
Browse files

Remove libgit2 dependency

It's more complicated than it's worth; if we run into portability issues with
exec on Windows we can always clone via the running mediawiki container.

Change-Id: I289ff907a74dfd18b19541ef90e4db29048f2364
parent f93e31b3
# MediaWiki CLI
This project contains a command-line interface for interacting with MediaWiki development environments.
This project contains a command-line interface for interacting with MediaWiki
development environments.
## Docker
In this initial version there is support for interacting with MediaWiki core's docker-compose development environment,
with subcommands provided under the `docker` namespace: `mw help docker`.
In this initial version there is support for interacting with MediaWiki core's
docker-compose development environment, with subcommands provided under the
`docker` namespace: `mw help docker`.
## Contributing
Clone this repository to your `$GOPATH` (probably `~/go`), so it would be at `~/go/src/cli`.
Clone this repository to your `$GOPATH` (probably `~/go`), so it would be at
`~/go/src/cli`.
In the `cli` directory run `go get` to download go package dependencies.
`libgit2` is a system dependency that can be installed on macOS with `brew install libgit2` and on Debian with `apt install libgit2-dev`.
Execute the script with `go run ~/go/src/cli/main.go`
## Support
......
......@@ -21,7 +21,6 @@ import (
"github.com/briandowns/spinner"
"github.com/manifoldco/promptui"
"github.com/spf13/cobra"
"gopkg.in/libgit2/git2go.v28"
"log"
"os"
"os/exec"
......@@ -103,7 +102,7 @@ func promptToInstallMediaWiki() {
_, err := prompt.Run()
if err == nil {
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Prefix = "Installing"
s.Prefix = "Installing "
s.Start()
command := exec.Command(
......@@ -146,9 +145,15 @@ func promptToCloneVector() {
_, err := prompt.Run()
if err == nil {
s := spinner.New(spinner.CharSets[9], 100*time.Millisecond)
s.Prefix = "Downloading Vector"
s.Prefix = "Downloading Vector "
s.Start()
_, err := git.Clone("https://gerrit.wikimedia.org/r/mediawiki/skins/Vector", "skins/Vector", &git.CloneOptions{})
command := exec.Command(
"git",
"clone",
"https://gerrit.wikimedia.org/r/mediawiki/skins/Vector",
"skins/Vector")
stdoutStderr, err := command.CombinedOutput()
fmt.Printf("%s\n", stdoutStderr)
if err != nil {
log.Fatal(err)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment