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

Hotfix: use string for main var and add to makefile #274

Merged
merged 2 commits into from
Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ build:
go build \
-o bin/space \
-ldflags \
"-X 'main.ipfsnodeaddr=${IPFS_NODE_ADDR}' \
"-X 'main.ipfsaddr=${IPFS_ADDR}' \
-X 'main.ipfsnodeaddr=${IPFS_NODE_ADDR}' \
-X 'main.ipfsnodepath=${IPFS_NODE_PATH}' \
-X 'main.spaceapi=${SERVICES_API_URL}' \
-X 'main.spacestoragesiteurl=${SPACE_STORAGE_SITE_URL}' \
Expand Down
4 changes: 2 additions & 2 deletions cmd/space-daemon/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ var (
debugMode = flag.Bool("debug", true, "run daemon with debug mode for profiling")
enableTracing = flag.Bool("trace", false, "run tracing on daemon rpc")
devMode = flag.Bool("dev", false, "run daemon in dev mode to use .env file")
ipfsaddr = flag.String("ipfsaddr", "/ip4/127.0.0.1/tcp/5001", "IPFS multiaddress to connect to (defaults to local node)")
ipfsnode = flag.Bool("ipfsnode", true, "run IPFS embedded into the daemon (defaults to true)")
ipfsaddr string
ipfsnodeaddr string
ipfsnodepath string
spaceapi string
Expand All @@ -56,7 +56,7 @@ func main() {
log.Debug("Running mode", fmt.Sprintf("DevMode:%v", *devMode))

cf := &config.Flags{
Ipfsaddr: *ipfsaddr,
Ipfsaddr: ipfsaddr,
Ipfsnode: *ipfsnode == true,
Ipfsnodeaddr: ipfsnodeaddr,
Ipfsnodepath: ipfsnodepath,
Expand Down