Skip to content

Commit 15054fb

Browse files
authored
Merge pull request #13 from AkihiroSuda/move-to-lima
github.com/AkihiroSuda/sshocker -> github.com/lima-vm/sshocker
2 parents 2879871 + 4d571aa commit 15054fb

File tree

9 files changed

+36
-24
lines changed

9 files changed

+36
-24
lines changed

.github/workflows/release.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ jobs:
2020
go-version: ${{ matrix.go-version }}
2121
- uses: actions/checkout@v2
2222
with:
23-
path: go/src/github.com/AkihiroSuda/sshocker
23+
path: go/src/github.com/lima-vm/sshocker
2424
- name: "Compile binaries"
25-
working-directory: go/src/github.com/AkihiroSuda/sshocker
25+
working-directory: go/src/github.com/lima-vm/sshocker
2626
run: make cross
2727
- name: "SHA256SUMS"
28-
working-directory: go/src/github.com/AkihiroSuda/sshocker
28+
working-directory: go/src/github.com/lima-vm/sshocker
2929
run: ( cd ./bin; sha256sum sshocker-* ) | tee /tmp/SHA256SUMS
3030
- name: "Prepare the release note"
31-
working-directory: go/src/github.com/AkihiroSuda/sshocker
31+
working-directory: go/src/github.com/lima-vm/sshocker
3232
run: |
3333
tag="${GITHUB_REF##*/}"
3434
cat << EOF | tee /tmp/release-note.txt
@@ -49,7 +49,7 @@ jobs:
4949
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
5050
EOF
5151
- name: "Create release"
52-
working-directory: go/src/github.com/AkihiroSuda/sshocker
52+
working-directory: go/src/github.com/lima-vm/sshocker
5353
env:
5454
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5555
run: |

Makefile

+13-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
.DEFAULT_GOAL := binary
22

3-
GO := go
3+
GO ?= go
4+
5+
PACKAGE := github.com/lima-vm/sshocker
6+
7+
VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always --tags)
8+
VERSION_TRIMMED := $(VERSION:v%=%)
9+
10+
GO_BUILD := CGO_ENABLED=0 $(GO) build -ldflags="-s -w -X $(PACKAGE)/pkg/version.Version=$(VERSION)"
411

512
binary: bin/sshocker
613

@@ -11,14 +18,15 @@ uninstall:
1118
rm -f /usr/local/bin/sshocker
1219

1320
bin/sshocker:
14-
CGO_ENABLED=0 $(GO) build -o $@ ./cmd/sshocker
21+
$(GO_BUILD) -o $@ ./cmd/sshocker
1522
if [ $(shell go env GOOS) = linux ]; then LANG=C LC_ALL=C file $@ | grep -qw "statically linked"; fi
1623

1724
# The file name convention for Unix: ./bin/sshocker-$(uname -s)-$(uname -m)
1825
cross:
19-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -o ./bin/sshocker-Linux-x86_64 ./cmd/sshocker
20-
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO) build -o ./bin/sshocker-Linux-aarch64 ./cmd/sshocker
21-
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GO) build -o ./bin/sshocker-Darwin-x86_64 ./cmd/sshocker
26+
GOOS=linux GOARCH=amd64 $(GO_BUILD) -o ./bin/sshocker-Linux-x86_64 ./cmd/sshocker
27+
GOOS=linux GOARCH=arm64 $(GO_BUILD) -o ./bin/sshocker-Linux-aarch64 ./cmd/sshocker
28+
GOOS=darwin GOARCH=amd64 $(GO_BUILD) -o ./bin/sshocker-Darwin-x86_64 ./cmd/sshocker
29+
GOOS=darwin GOARCH=arm64 $(GO_BUILD) -o ./bin/sshocker-Darwin-arm64 ./cmd/sshocker
2230

2331
clean:
2432
rm -rf bin

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ This is akin to `docker run -p 8080:80 -v $(pwd):/mnt IMAGE`, but `sshocker` is
1010

1111
## Install
1212

13-
Download from https://github.com/AkihiroSuda/sshocker/releases .
13+
Download from https://github.com/lima-vm/sshocker/releases .
1414

1515
To download using curl:
1616
```
17-
curl -o sshocker --fail -L https://github.com/AkihiroSuda/sshocker/releases/latest/download/sshocker-$(uname -s)-$(uname -m)
17+
curl -o sshocker --fail -L https://github.com/lima-vm/sshocker/releases/latest/download/sshocker-$(uname -s)-$(uname -m)
1818
chmod +x sshocker
1919
```
2020

2121
To compile from source:
2222
```console
23-
go get github.com/AkihiroSuda/sshocker/cmd/sshocker
23+
make
24+
sudo make install
2425
```
2526

2627
Tested on macOS client and Linux server. May not work on other environments, especially on Windows.

cmd/sshocker/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"os"
66

7-
"github.com/AkihiroSuda/sshocker/pkg/version"
7+
"github.com/lima-vm/sshocker/pkg/version"
88
"github.com/sirupsen/logrus"
99
"github.com/urfave/cli/v2"
1010
)

cmd/sshocker/run.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"strconv"
88
"strings"
99

10-
"github.com/AkihiroSuda/sshocker/pkg/mount"
11-
"github.com/AkihiroSuda/sshocker/pkg/ssh"
12-
"github.com/AkihiroSuda/sshocker/pkg/sshocker"
10+
"github.com/lima-vm/sshocker/pkg/mount"
11+
"github.com/lima-vm/sshocker/pkg/ssh"
12+
"github.com/lima-vm/sshocker/pkg/sshocker"
1313
"github.com/pkg/errors"
1414
"github.com/urfave/cli/v2"
1515
)

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/AkihiroSuda/sshocker
1+
module github.com/lima-vm/sshocker
22

33
go 1.17
44

pkg/reversesshfs/reversesshfs.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"path/filepath"
1010
"strconv"
1111

12-
"github.com/AkihiroSuda/sshocker/pkg/ssh"
13-
"github.com/AkihiroSuda/sshocker/pkg/util"
12+
"github.com/lima-vm/sshocker/pkg/ssh"
13+
"github.com/lima-vm/sshocker/pkg/util"
1414
"github.com/pkg/errors"
1515
"github.com/pkg/sftp"
1616
"github.com/sirupsen/logrus"

pkg/sshocker/sshocker.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import (
55
"os/exec"
66
"strconv"
77

8-
"github.com/AkihiroSuda/sshocker/pkg/mount"
9-
"github.com/AkihiroSuda/sshocker/pkg/reversesshfs"
10-
"github.com/AkihiroSuda/sshocker/pkg/ssh"
8+
"github.com/lima-vm/sshocker/pkg/mount"
9+
"github.com/lima-vm/sshocker/pkg/reversesshfs"
10+
"github.com/lima-vm/sshocker/pkg/ssh"
1111
"github.com/pkg/errors"
1212
"github.com/sirupsen/logrus"
1313
)

pkg/version/version.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
package version
22

3-
const Version = "0.1.0+dev"
3+
var (
4+
// Version is filled on compilation time
5+
Version = "<unknown>"
6+
)

0 commit comments

Comments
 (0)