Skip to content

Commit

Permalink
Merge pull request #13 from AkihiroSuda/move-to-lima
Browse files Browse the repository at this point in the history
github.com/AkihiroSuda/sshocker -> github.com/lima-vm/sshocker
  • Loading branch information
AkihiroSuda authored Aug 19, 2021
2 parents 2879871 + 4d571aa commit 15054fb
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v2
with:
path: go/src/github.com/AkihiroSuda/sshocker
path: go/src/github.com/lima-vm/sshocker
- name: "Compile binaries"
working-directory: go/src/github.com/AkihiroSuda/sshocker
working-directory: go/src/github.com/lima-vm/sshocker
run: make cross
- name: "SHA256SUMS"
working-directory: go/src/github.com/AkihiroSuda/sshocker
working-directory: go/src/github.com/lima-vm/sshocker
run: ( cd ./bin; sha256sum sshocker-* ) | tee /tmp/SHA256SUMS
- name: "Prepare the release note"
working-directory: go/src/github.com/AkihiroSuda/sshocker
working-directory: go/src/github.com/lima-vm/sshocker
run: |
tag="${GITHUB_REF##*/}"
cat << EOF | tee /tmp/release-note.txt
Expand All @@ -49,7 +49,7 @@ jobs:
https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
EOF
- name: "Create release"
working-directory: go/src/github.com/AkihiroSuda/sshocker
working-directory: go/src/github.com/lima-vm/sshocker
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
Expand Down
18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
.DEFAULT_GOAL := binary

GO := go
GO ?= go

PACKAGE := github.com/lima-vm/sshocker

VERSION=$(shell git describe --match 'v[0-9]*' --dirty='.m' --always --tags)
VERSION_TRIMMED := $(VERSION:v%=%)

GO_BUILD := CGO_ENABLED=0 $(GO) build -ldflags="-s -w -X $(PACKAGE)/pkg/version.Version=$(VERSION)"

binary: bin/sshocker

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

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

# The file name convention for Unix: ./bin/sshocker-$(uname -s)-$(uname -m)
cross:
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 $(GO) build -o ./bin/sshocker-Linux-x86_64 ./cmd/sshocker
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 $(GO) build -o ./bin/sshocker-Linux-aarch64 ./cmd/sshocker
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 $(GO) build -o ./bin/sshocker-Darwin-x86_64 ./cmd/sshocker
GOOS=linux GOARCH=amd64 $(GO_BUILD) -o ./bin/sshocker-Linux-x86_64 ./cmd/sshocker
GOOS=linux GOARCH=arm64 $(GO_BUILD) -o ./bin/sshocker-Linux-aarch64 ./cmd/sshocker
GOOS=darwin GOARCH=amd64 $(GO_BUILD) -o ./bin/sshocker-Darwin-x86_64 ./cmd/sshocker
GOOS=darwin GOARCH=arm64 $(GO_BUILD) -o ./bin/sshocker-Darwin-arm64 ./cmd/sshocker

clean:
rm -rf bin
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ This is akin to `docker run -p 8080:80 -v $(pwd):/mnt IMAGE`, but `sshocker` is

## Install

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

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

To compile from source:
```console
go get github.com/AkihiroSuda/sshocker/cmd/sshocker
make
sudo make install
```

Tested on macOS client and Linux server. May not work on other environments, especially on Windows.
Expand Down
2 changes: 1 addition & 1 deletion cmd/sshocker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"os"

"github.com/AkihiroSuda/sshocker/pkg/version"
"github.com/lima-vm/sshocker/pkg/version"
"github.com/sirupsen/logrus"
"github.com/urfave/cli/v2"
)
Expand Down
6 changes: 3 additions & 3 deletions cmd/sshocker/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strconv"
"strings"

"github.com/AkihiroSuda/sshocker/pkg/mount"
"github.com/AkihiroSuda/sshocker/pkg/ssh"
"github.com/AkihiroSuda/sshocker/pkg/sshocker"
"github.com/lima-vm/sshocker/pkg/mount"
"github.com/lima-vm/sshocker/pkg/ssh"
"github.com/lima-vm/sshocker/pkg/sshocker"
"github.com/pkg/errors"
"github.com/urfave/cli/v2"
)
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/AkihiroSuda/sshocker
module github.com/lima-vm/sshocker

go 1.17

Expand Down
4 changes: 2 additions & 2 deletions pkg/reversesshfs/reversesshfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"path/filepath"
"strconv"

"github.com/AkihiroSuda/sshocker/pkg/ssh"
"github.com/AkihiroSuda/sshocker/pkg/util"
"github.com/lima-vm/sshocker/pkg/ssh"
"github.com/lima-vm/sshocker/pkg/util"
"github.com/pkg/errors"
"github.com/pkg/sftp"
"github.com/sirupsen/logrus"
Expand Down
6 changes: 3 additions & 3 deletions pkg/sshocker/sshocker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"os/exec"
"strconv"

"github.com/AkihiroSuda/sshocker/pkg/mount"
"github.com/AkihiroSuda/sshocker/pkg/reversesshfs"
"github.com/AkihiroSuda/sshocker/pkg/ssh"
"github.com/lima-vm/sshocker/pkg/mount"
"github.com/lima-vm/sshocker/pkg/reversesshfs"
"github.com/lima-vm/sshocker/pkg/ssh"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
)
Expand Down
5 changes: 4 additions & 1 deletion pkg/version/version.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
package version

const Version = "0.1.0+dev"
var (
// Version is filled on compilation time
Version = "<unknown>"
)

0 comments on commit 15054fb

Please sign in to comment.