Skip to content

Commit

Permalink
feat: rename refs, add github action and new index file
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-mccourt committed Oct 18, 2022
1 parent 0185403 commit 9acd8ad
Show file tree
Hide file tree
Showing 23 changed files with 4,257 additions and 1,692 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: make Jabba

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
make:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
stable: 'false'
go-version: '1.16.15'
- name: fetch
run: make fetch
- name: test
run: make test

6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ install: build

publish: clean build-release
test -n "$(GITHUB_TOKEN)" # $$GITHUB_TOKEN must be set
github-release release --user shyiko --repo jabba --tag ${VERSION} \
github-release release --user patrick-mccourt --repo Jabba-Team/jabba --tag ${VERSION} \
--name "${VERSION}" --description "${VERSION}" && \
github-release upload --user shyiko --repo jabba --tag ${VERSION} \
github-release upload --user patrick-mccourt --repo Jabba-Team/jabba --tag ${VERSION} \
--name "jabba-${VERSION}-windows-amd64.exe" --file release/jabba-${VERSION}-windows-amd64.exe; \
for qualifier in darwin-amd64 linux-386 linux-amd64 linux-arm linux-arm64; do \
github-release upload --user shyiko --repo jabba --tag ${VERSION} \
github-release upload --user patrick-mccourt --repo Jabba-Team/jabba --tag ${VERSION} \
--name "jabba-${VERSION}-$$qualifier" --file release/jabba-${VERSION}-$$qualifier; \
done
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# jabba ![Latest Version](https://img.shields.io/badge/latest-0.11.2-blue.svg) [![Build Status](https://travis-ci.org/shyiko/jabba.svg?branch=master)](https://travis-ci.org/shyiko/jabba)
# jabba ![Latest Version](https://img.shields.io/badge/latest-0.11.2-blue.svg) [![Build Status](https://travis-ci.org/Jabba-Team/jabba.svg?branch=master)](https://travis-ci.org/Jabba-Team/jabba)

Java Version Manager inspired by [nvm](https://github.com/creationix/nvm) (Node.js). Written in Go.

Expand Down Expand Up @@ -31,7 +31,7 @@ the OS (macOS, Linux x86/x86_64/ARMv7+, Windows x86_64).
```sh
export JABBA_VERSION=...
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash && . ~/.jabba/jabba.sh
curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | bash && . ~/.jabba/jabba.sh
```

> (use the same command to upgrade)
Expand All @@ -40,7 +40,7 @@ The script modifies common shell rc files by default. To skip these provide the

```sh
export JABBA_VERSION=...
curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash -s -- --skip-rc && . ~/.jabba/jabba.sh
curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | bash -s -- --skip-rc && . ~/.jabba/jabba.sh
```

Make sure to source `jabba.sh` in your environment if you skip it:
Expand All @@ -52,7 +52,7 @@ export JABBA_VERSION=...

> In [fish](https://fishshell.com/) command looks a little bit different -
> export JABBA_VERSION=...
`curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | bash; and . ~/.jabba/jabba.fish`
`curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | bash; and . ~/.jabba/jabba.fish`

> If you don't have `curl` installed - replace `curl -sL` with `wget -qO-`.
Expand All @@ -71,7 +71,7 @@ integration script(s) to be included in the final Docker image, all you want is
```dockerfile
FROM buildpack-deps:jessie-curl

RUN curl -sL https://github.com/shyiko/jabba/raw/master/install.sh | \
RUN curl -sL https://github.com/Jabba-Team/jabba/raw/main/install.sh | \
JABBA_COMMAND="install 1.15.0 -o /jdk" bash

ENV JAVA_HOME /jdk
Expand All @@ -94,7 +94,7 @@ java version "1.15.0....
```powershell
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-Expression (
Invoke-WebRequest https://github.com/shyiko/jabba/raw/master/install.ps1 -UseBasicParsing
Invoke-WebRequest https://github.com/Jabba-Team/jabba/raw/main/install.ps1 -UseBasicParsing
).Content
```
Expand Down Expand Up @@ -169,8 +169,8 @@ For more information see `jabba --help`.
> PREREQUISITE: [go1.8](https://github.com/moovweb/gvm)
```sh
git clone https://github.com/shyiko/jabba $GOPATH/src/github.com/shyiko/jabba
cd $GOPATH/src/github.com/shyiko/jabba
git clone https://github.com/Jabba-Team/jabba $GOPATH/src/github.com/Jabba-Team/jabba
cd $GOPATH/src/github.com/Jabba-Team/jabba
make fetch
go run jabba.go
Expand Down
7 changes: 4 additions & 3 deletions cfg/cfg.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package cfg

import (
log "github.com/Sirupsen/logrus"
"github.com/mitchellh/go-homedir"
"os"
"path/filepath"

log "github.com/Sirupsen/logrus"
"github.com/mitchellh/go-homedir"
)

func Dir() string {
Expand All @@ -22,7 +23,7 @@ func Dir() string {
func Index() string {
registry := os.Getenv("JABBA_INDEX")
if registry == "" {
registry = "https://github.com/shyiko/jabba/raw/master/index.json"
registry = "https://github.com/Jabba-Team/jabba/raw/fix/build/index.json"
}
return registry
}
3 changes: 2 additions & 1 deletion command/alias.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"io/ioutil"
"os"
"path/filepath"

"github.com/Jabba-Team/jabba/cfg"
)

func SetAlias(name string, ver string) (err error) {
Expand Down
3 changes: 2 additions & 1 deletion command/current.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"os"
"os/exec"
"path/filepath"
"strings"

"github.com/Jabba-Team/jabba/cfg"
)

var lookPath = exec.LookPath
Expand Down
3 changes: 2 additions & 1 deletion command/current_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"path/filepath"
"testing"

"github.com/Jabba-Team/jabba/cfg"
)

func TestCurrent(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion command/deactivate.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"os"
"path/filepath"
"regexp"

"github.com/Jabba-Team/jabba/cfg"
)

func Deactivate() ([]string, error) {
Expand Down
3 changes: 2 additions & 1 deletion command/deactivate_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"os"
"reflect"
"testing"

"github.com/Jabba-Team/jabba/cfg"
)

func TestDeactivate(t *testing.T) {
Expand Down
17 changes: 9 additions & 8 deletions command/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ import (
"compress/gzip"
"errors"
"fmt"
log "github.com/Sirupsen/logrus"
"github.com/mitchellh/ioprogress"
"github.com/shyiko/jabba/cfg"
"github.com/shyiko/jabba/command/fileiter"
"github.com/shyiko/jabba/semver"
"github.com/shyiko/jabba/w32"
"github.com/xi2/xz"
"io"
"io/ioutil"
"net/http"
Expand All @@ -23,6 +16,14 @@ import (
"runtime"
"sort"
"strings"

"github.com/Jabba-Team/jabba/cfg"
"github.com/Jabba-Team/jabba/command/fileiter"
"github.com/Jabba-Team/jabba/semver"
"github.com/Jabba-Team/jabba/w32"
log "github.com/Sirupsen/logrus"
"github.com/mitchellh/ioprogress"
"github.com/xi2/xz"
)

func Install(selector string, dst string) (string, error) {
Expand Down Expand Up @@ -323,7 +324,7 @@ func assertJavaDistribution(dir string, goos string) error {
var err error
if _, err = os.Stat(path); os.IsNotExist(err) {
err = errors.New(path + " wasn't found. " +
"If you believe this is an error - please create a ticket at https://github.com/shyiko/jabba/issues " +
"If you believe this is an error - please create a ticket at https://github.com/Jabba-Team/jabba/issues " +
"(specify OS and command that was used)")
}
return err
Expand Down
7 changes: 4 additions & 3 deletions command/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package command

import (
"errors"
log "github.com/Sirupsen/logrus"
"github.com/shyiko/jabba/cfg"
"github.com/shyiko/jabba/semver"
"os"
"path/filepath"
"runtime"
"strings"

"github.com/Jabba-Team/jabba/cfg"
"github.com/Jabba-Team/jabba/semver"
log "github.com/Sirupsen/logrus"
)

func Link(selector string, dir string) error {
Expand Down
4 changes: 2 additions & 2 deletions command/ls-remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strconv"
"strings"

"github.com/shyiko/jabba/cfg"
"github.com/shyiko/jabba/semver"
"github.com/Jabba-Team/jabba/cfg"
"github.com/Jabba-Team/jabba/semver"
)

type byOS map[string]byArch
Expand Down
5 changes: 3 additions & 2 deletions command/ls.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package command

import (
"fmt"
"github.com/shyiko/jabba/cfg"
"github.com/shyiko/jabba/semver"
"io/ioutil"
"os"
"path/filepath"
"sort"
"strings"

"github.com/Jabba-Team/jabba/cfg"
"github.com/Jabba-Team/jabba/semver"
)

var readDir = ioutil.ReadDir
Expand Down
3 changes: 2 additions & 1 deletion command/uninstall.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"os"
"path/filepath"

"github.com/Jabba-Team/jabba/cfg"
)

func Uninstall(selector string) error {
Expand Down
3 changes: 2 additions & 1 deletion command/use.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"os"
"path/filepath"
"regexp"
"runtime"

"github.com/Jabba-Team/jabba/cfg"
)

func Use(selector string) ([]string, error) {
Expand Down
3 changes: 2 additions & 1 deletion command/use_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"os"
"reflect"
"runtime"
"testing"
"time"

"github.com/Jabba-Team/jabba/cfg"
)

type FileInfoMock string
Expand Down
3 changes: 2 additions & 1 deletion command/which.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package command

import (
"github.com/shyiko/jabba/cfg"
"path/filepath"
"runtime"

"github.com/Jabba-Team/jabba/cfg"
)

func Which(selector string, home bool) (string, error) {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/shyiko/jabba
module github.com/Jabba-Team/jabba

go 1.15

Expand Down
Loading

0 comments on commit 9acd8ad

Please sign in to comment.