Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ brew upgrade git-scope
curl -sSL https://raw.githubusercontent.com/Bharath-code/git-scope/main/scripts/install.sh | sh
```

### Scoop (Windows)
```powershell
scoop bucket add git-scope https://github.com/Bharath-code/git-scope
scoop install git-scope
```

### From Source (Windows)

```bash
Expand Down
30 changes: 30 additions & 0 deletions git-scope.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"version": "1.4.0",
"description": "A fast TUI dashboard to view the git status of all your repositories in one place.",
"homepage": "https://github.com/Bharath-code/git-scope",
"license": "MIT",
"architecture": {
"64bit": {
"url": "https://github.com/Bharath-code/git-scope/releases/download/v1.4.0/git-scope_1.4.0_windows_amd64.zip",
"hash": ""
},
"arm64": {
"url": "https://github.com/Bharath-code/git-scope/releases/download/v1.4.0/git-scope_1.4.0_windows_arm64.zip",
"hash": ""
}
},
"bin": "git-scope.exe",
"checkver": {
"github": "https://github.com/Bharath-code/git-scope"
},
"autoupdate": {
"architecture": {
"64bit": {
"url": "https://github.com/Bharath-code/git-scope/releases/download/v$version/git-scope_$version_windows_amd64.zip"
},
"arm64": {
"url": "https://github.com/Bharath-code/git-scope/releases/download/v$version/git-scope_$version_windows_arm64.zip"
}
}
}
}
41 changes: 41 additions & 0 deletions git-scope_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package gitscope_test

import (
"encoding/json"
"os"
"testing"
)

func TestScoopManifestIsValidJSON(t *testing.T) {
data, err := os.ReadFile("git-scope.json")
if err != nil {
t.Fatalf("failed to read git-scope.json: %v", err)
}

var manifest map[string]interface{}
if err := json.Unmarshal(data, &manifest); err != nil {
t.Fatalf("git-scope.json is not valid JSON: %v", err)
}

requiredFields := []string{"version", "description", "homepage", "license", "architecture", "bin", "checkver", "autoupdate"}
for _, field := range requiredFields {
if _, ok := manifest[field]; !ok {
t.Errorf("missing required field: %s", field)
}
}

arch, ok := manifest["architecture"].(map[string]interface{})
if !ok {
t.Fatal("architecture field is not an object")
}
for _, key := range []string{"64bit", "arm64"} {
entry, ok := arch[key].(map[string]interface{})
if !ok {
t.Errorf("architecture.%s is not an object", key)
continue
}
if _, ok := entry["url"]; !ok {
t.Errorf("architecture.%s missing url", key)
}
}
}