Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make build-ui changes #1257

Merged
merged 10 commits into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .goreleaser-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,60 @@ builds:
main: ./cmd/skywire-cli/
ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}}


- id: setup-node-amd64
binary: setup-node
goos:
- linux
goarch:
- amd64
env:
- CGO_ENABLED=1
- CC=/home/appveyor/projects/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc
main: ./cmd/setup-node/
ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}}

- id: setup-node-arm64
binary: setup-node
goos:
- linux
goarch:
- arm64
env:
- CGO_ENABLED=1
- CC=/home/appveyor/projects/aarch64-linux-musl-cross/bin/aarch64-linux-musl-gcc
main: ./cmd/setup-node/
ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}}

- id: setup-node-arm
binary: setup-node
goos:
- linux
goarch:
- arm
goarm:
- 6
env:
- CGO_ENABLED=1
- CC=/home/appveyor/projects/arm-linux-musleabi-cross/bin/arm-linux-musleabi-gcc
main: ./cmd/setup-node/
ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}}

- id: setup-node-armhf
binary: setup-node
goos:
- linux
goarch:
- arm
goarm:
- 7
env:
- CGO_ENABLED=1
- CC=/home/appveyor/projects/arm-linux-musleabihf-cross/bin/arm-linux-musleabihf-gcc
main: ./cmd/setup-node/
ldflags: -s -w -linkmode external -extldflags '-static' -buildid= -X github.com/skycoin/skywire-utilities/pkg/buildinfo.version=v{{.Version}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.commit={{.ShortCommit}} -X github.com/skycoin/skywire-utilities/pkg/buildinfo.date={{.Date}} -X github.com/skycoin/skywire/pkg/visor.BuildTag={{.Os}}_{{.Arch}}


- id: skychat-amd64
binary: apps/skychat
goos:
Expand Down Expand Up @@ -418,6 +472,7 @@ archives:
builds:
- skywire-visor-amd64
- skywire-cli-amd64
- setup-node-amd64
- skysocks-amd64
- skysocks-client-amd64
- skychat-amd64
Expand All @@ -433,6 +488,7 @@ archives:
builds:
- skywire-visor-arm64
- skywire-cli-arm64
- setup-node-arm64
- skysocks-arm64
- skysocks-client-arm64
- skychat-arm64
Expand All @@ -448,6 +504,7 @@ archives:
builds:
- skywire-visor-arm
- skywire-cli-arm
- setup-node-arm
- skysocks-arm
- skysocks-client-arm
- skychat-arm
Expand All @@ -463,6 +520,7 @@ archives:
builds:
- skywire-visor-armhf
- skywire-cli-armhf
- setup-node-armhf
- skysocks-armhf
- skysocks-client-armhf
- skychat-armhf
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `run-vpnsrv -dmsghttp-test` makefile directive
- `install-system-linux` and `install-system-linux-systray` makefile directives
- `trace` log level is added
- `--log-lever` flag to generate and update config by `skywire-cli`

## 0.6.0

Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ else
endif
endif

ifeq ($(BUILDTAG),)
ifeq ($(OS),Windows_NT)
BUILDTAG = "Windows"
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
BUILDTAG = "Linux"
endif
ifeq ($(UNAME_S),Darwin)
BUILDTAG = "Darwin"
endif
endif
endif

STATIC_OPTS?= $(OPTS) CC=musl-gcc
MANAGER_UI_DIR = static/skywire-manager-src
GO_BUILDER_VERSION=v1.17
Expand Down
9 changes: 9 additions & 0 deletions cmd/skywire-cli/commands/config/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ var (
testconf = strings.ReplaceAll(utilenv.TestServiceConfAddr, "http://", "") //skyenv.DefaultServiceConfAddr
hiddenflags []string
binPath string
logLevel string
)

func init() {
Expand All @@ -65,6 +66,8 @@ func init() {

genConfigCmd.Flags().StringVarP(&serviceConfURL, "url", "a", svcconf, "services conf")
hiddenflags = append(hiddenflags, "url")
genConfigCmd.Flags().StringVar(&logLevel, "log-level", "info", "level of logging in config")
hiddenflags = append(hiddenflags, "log-level")
genConfigCmd.Flags().BoolVarP(&bestProtocol, "bestproto", "b", false, "best protocol (dmsg | direct) based on location")
genConfigCmd.Flags().BoolVarP(&disableauth, "noauth", "c", false, "disable authentication for hypervisor UI")
hiddenflags = append(hiddenflags, "noauth")
Expand Down Expand Up @@ -375,6 +378,12 @@ var genConfigCmd = &cobra.Command{
conf.Hypervisor.EnableAuth = true
}
}
// Set log level
if logLevel != "" {
if logLevel == "trace" || logLevel == "debug" {
conf.LogLevel = logLevel
}
}
// check binpath argument and use if set
if binPath != "" {
conf.Launcher.BinPath = binPath
Expand Down
8 changes: 8 additions & 0 deletions cmd/skywire-cli/commands/config/update/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ var (
root bool
usr bool
hiddenflags []string
logLevel string
)

var logger = logging.MustGetLogger("skywire-cli")
Expand All @@ -61,6 +62,7 @@ func init() {
}
RootCmd.Flags().SortFlags = false
RootCmd.Flags().BoolVarP(&updateEndpoints, "endpoints", "a", false, "update server endpoints")
RootCmd.Flags().StringVar(&logLevel, "log-level", "", "level of logging in config")
RootCmd.Flags().StringVarP(&serviceConfURL, "url", "b", "", "service config URL: "+svcconf)
RootCmd.Flags().BoolVarP(&testEnv, "testenv", "t", false, "use test deployment: "+testconf)
RootCmd.Flags().StringVar(&setPublicAutoconnect, "public-autoconn", "", "change public autoconnect configuration")
Expand Down Expand Up @@ -132,6 +134,12 @@ var RootCmd = &cobra.Command{
conf.StunServers = services.StunServers //utilenv.GetStunServers()
}

if conf.LogLevel != logLevel {
if logLevel == "trace" || logLevel == "debug" || logLevel == "info" {
conf.LogLevel = logLevel
}
}

switch setPublicAutoconnect {
case "true":
conf.Transport.PublicAutoconnect = true
Expand Down
2 changes: 1 addition & 1 deletion cmd/skywire-visor/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<body>
<div class="app-background"></div>
<app-root></app-root>
<script src="runtime.9bf7178cb9fbf835.js" type="module"></script><script src="polyfills.3470f480c4d335d9.js" type="module"></script><script src="scripts.db15b74cd449c824.js" defer></script><script src="main.559ec3dbbc5cee79.js" type="module"></script>
<script src="runtime.9bf7178cb9fbf835.js" type="module"></script><script src="polyfills.3470f480c4d335d9.js" type="module"></script><script src="scripts.db15b74cd449c824.js" defer></script><script src="main.52840b491595f13d.js" type="module"></script>

</body></html>
1 change: 1 addition & 0 deletions cmd/skywire-visor/static/main.52840b491595f13d.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion cmd/skywire-visor/static/main.559ec3dbbc5cee79.js

This file was deleted.

1 change: 1 addition & 0 deletions static/skywire-manager-src/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
},
"defaultProject": "skywire-manager",
"cli": {
"analytics": "2d518d5d-5b45-41d0-ab29-e449d316a742",
"defaultCollection": "@angular-eslint/schematics"
}
}
2 changes: 1 addition & 1 deletion static/skywire-manager-src/dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
<body>
<div class="app-background"></div>
<app-root></app-root>
<script src="runtime.9bf7178cb9fbf835.js" type="module"></script><script src="polyfills.3470f480c4d335d9.js" type="module"></script><script src="scripts.db15b74cd449c824.js" defer></script><script src="main.559ec3dbbc5cee79.js" type="module"></script>
<script src="runtime.9bf7178cb9fbf835.js" type="module"></script><script src="polyfills.3470f480c4d335d9.js" type="module"></script><script src="scripts.db15b74cd449c824.js" defer></script><script src="main.52840b491595f13d.js" type="module"></script>

</body></html>