Skip to content

Commit f5deaec

Browse files
authored
Fix: [ENHANCEMENT] Support installation via Scoop (Windows) (#22)
* fix: address issue #19 * chore: remove bot artifacts (pr_body.md, CANNOT_COMPLETE.md) --------- Co-authored-by: gabrnavarro <gabrnavarro@users.noreply.github.com>
1 parent 7e6ddf6 commit f5deaec

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ brew upgrade git-scope
4545
curl -sSL https://raw.githubusercontent.com/Bharath-code/git-scope/main/scripts/install.sh | sh
4646
```
4747

48+
### Scoop (Windows)
49+
```powershell
50+
scoop bucket add git-scope https://github.com/Bharath-code/git-scope
51+
scoop install git-scope
52+
```
53+
4854
### From Source (Windows)
4955

5056
```bash

git-scope.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"version": "1.4.0",
3+
"description": "A fast TUI dashboard to view the git status of all your repositories in one place.",
4+
"homepage": "https://github.com/Bharath-code/git-scope",
5+
"license": "MIT",
6+
"architecture": {
7+
"64bit": {
8+
"url": "https://github.com/Bharath-code/git-scope/releases/download/v1.4.0/git-scope_1.4.0_windows_amd64.zip",
9+
"hash": ""
10+
},
11+
"arm64": {
12+
"url": "https://github.com/Bharath-code/git-scope/releases/download/v1.4.0/git-scope_1.4.0_windows_arm64.zip",
13+
"hash": ""
14+
}
15+
},
16+
"bin": "git-scope.exe",
17+
"checkver": {
18+
"github": "https://github.com/Bharath-code/git-scope"
19+
},
20+
"autoupdate": {
21+
"architecture": {
22+
"64bit": {
23+
"url": "https://github.com/Bharath-code/git-scope/releases/download/v$version/git-scope_$version_windows_amd64.zip"
24+
},
25+
"arm64": {
26+
"url": "https://github.com/Bharath-code/git-scope/releases/download/v$version/git-scope_$version_windows_arm64.zip"
27+
}
28+
}
29+
}
30+
}

git-scope_test.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
package gitscope_test
2+
3+
import (
4+
"encoding/json"
5+
"os"
6+
"testing"
7+
)
8+
9+
func TestScoopManifestIsValidJSON(t *testing.T) {
10+
data, err := os.ReadFile("git-scope.json")
11+
if err != nil {
12+
t.Fatalf("failed to read git-scope.json: %v", err)
13+
}
14+
15+
var manifest map[string]interface{}
16+
if err := json.Unmarshal(data, &manifest); err != nil {
17+
t.Fatalf("git-scope.json is not valid JSON: %v", err)
18+
}
19+
20+
requiredFields := []string{"version", "description", "homepage", "license", "architecture", "bin", "checkver", "autoupdate"}
21+
for _, field := range requiredFields {
22+
if _, ok := manifest[field]; !ok {
23+
t.Errorf("missing required field: %s", field)
24+
}
25+
}
26+
27+
arch, ok := manifest["architecture"].(map[string]interface{})
28+
if !ok {
29+
t.Fatal("architecture field is not an object")
30+
}
31+
for _, key := range []string{"64bit", "arm64"} {
32+
entry, ok := arch[key].(map[string]interface{})
33+
if !ok {
34+
t.Errorf("architecture.%s is not an object", key)
35+
continue
36+
}
37+
if _, ok := entry["url"]; !ok {
38+
t.Errorf("architecture.%s missing url", key)
39+
}
40+
}
41+
}

0 commit comments

Comments
 (0)