Skip to content

Commit

Permalink
Merge pull request #1058 from the-skycoin-project/run-source
Browse files Browse the repository at this point in the history
add 'run-source' makefile directive
  • Loading branch information
jdknives authored Jan 25, 2022
2 parents 71d8884 + 9a388ff commit 42e548d
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 4 deletions.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ build-deploy: ## Build for deployment Docker images
github-release:
$(eval GITHUB_TAG=$(shell git describe --abbrev=0 --tags | cut -c 2-))
sed '/^## ${GITHUB_TAG}$$/,/^## .*/!d;//d;/^$$/d' ./CHANGELOG.md > releaseChangelog.md
goreleaser --rm-dist --release-notes releaseChangelog.md
goreleaser --rm-dist --release-notes releaseChangelog.md


build-docker: ## Build docker image
Expand All @@ -220,6 +220,14 @@ install-deps-ui: ## Install the UI dependencies
run: ## Run skywire visor with skywire-config.json, and start a browser if running a hypervisor
./skywire-visor -c ./skywire-config.json

## Run skywire from source, without compiling binaries - requires skywire cloned
run-source: #to standard gopath $HOME/go/src/github.com/skycoin/skywire
test -d apps && rm -r apps || true
ln -s _apps apps
go run ./cmd/skywire-cli/skywire-cli.go config gen -iro ./skywire-config.json
go run ./cmd/skywire-visor/skywire-visor.go -c ./skywire-config.json || true


lint-ui: ## Lint the UI code
cd $(MANAGER_UI_DIR) && npm run lint

Expand Down
26 changes: 23 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[![Build Status](https://travis-ci.com/skycoin/skywire.svg?branch=master)](https://travis-ci.com/skycoin/skywire)

Skywire requires a Golang version of `1.16` or higher.

# Skywire

- [Skywire](#skywire)
Expand All @@ -12,9 +14,16 @@
- [Creating a GitHub release](#creating-a-github-release)
- [How to create a GitHub release](#how-to-create-a-github-release)

## Build
## Run from source

Skywire requires a Golang version of `1.16` or higher.
```bash
$ mkdir -p $HOME/go/src/github.com/skycoin && cd $HOME/go/src/github.com/skycoin
$ git clone https://github.com/skycoin/skywire.git
$ cd skywire
$ make run-source
```

## Build

```bash
# Clone.
Expand Down Expand Up @@ -65,6 +74,18 @@ hypervisor needs to be specified in the configuration file. You can add a remote
$ skywire-cli config update --hypervisor-pks <public-key>
```

If the rpc server is exposed on the local network, or the config has been generated with the `--public-rpc` flag, the hypervisor public key can be queried over the network with skywire-cli:

```bash
$ skywire-cli --rpc <ip-address> visor pk
```

The previous two commands can be nested:

```bash
$ skywire-cli config update --hypervisor-pks $(skywire-cli --rpc <ip-address> visor pk)
```

Or from docker image:

```bash
Expand All @@ -77,7 +98,6 @@ Or from docker image:
```bash
$ docker run --rm -v <YOUR_CONFIG_DIR>:/opt/skywire \
skycoin/skywire:latest skywire-cli update-config hypervisor-pks <public-key>

```

## Run `skywire-visor`
Expand Down
2 changes: 2 additions & 0 deletions _apps/skychat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/bash
go run $HOME/go/src/github.com/skycoin/skywire/cmd/apps/skychat/chat.go
2 changes: 2 additions & 0 deletions _apps/skysocks
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/bash
go run $HOME/go/src/github.com/skycoin/skywire/cmd/apps/skysocks/skysocks.go
2 changes: 2 additions & 0 deletions _apps/skysocks-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/bash
go run $HOME/go/src/github.com/skycoin/skywire/cmd/apps/skysocks-client/skysocks-client.go
2 changes: 2 additions & 0 deletions _apps/vpn-client
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/bash
go run $HOME/go/src/github.com/skycoin/skywire/cmd/apps/vpn-client/vpn-client.go
2 changes: 2 additions & 0 deletions _apps/vpn-server
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/bash
go run $HOME/go/src/github.com/skycoin/skywire/cmd/apps/vpn-server/vpn-server.go

0 comments on commit 42e548d

Please sign in to comment.