some more detailed info on how to use the scripts for development
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
#!/usr/bin/zsh
|
||||
cd /home/loki/work/loki/indra-labs/indra
|
||||
export PATH=/home/loki/work/loki/indra-labs/indra/scripts:$PATH
|
||||
zsh
|
||||
7
scripts/cdwork.sh
Executable file
7
scripts/cdwork.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/zsh
|
||||
# populate ~/.workpath thus: `cd path/to/repo/root; pwd>~/.workpath
|
||||
export INDRAROOT=$(cat ~/.workpath)
|
||||
export PATH=$INDRAROOT/scripts:$PATH
|
||||
# put the path of the root of the repository in ./scripts/path
|
||||
cd $INDRAROOT
|
||||
zsh
|
||||
11
scripts/readme.md
Normal file
11
scripts/readme.md
Normal file
@@ -0,0 +1,11 @@
|
||||
# scripts
|
||||
|
||||
populate ~/.workpath thus: `cd path/to/repo/root; pwd>~/.workpath`
|
||||
|
||||
add this to your `~/.bashrc` or `~/.zshrc`:
|
||||
|
||||
export PATH=$(cat ~/.workpath)/scripts:$HOME/sdk/go1.19.10/bin:$PATH
|
||||
export GOBIN=$HOME/.local/bin
|
||||
|
||||
`source` the `rc` file or open a new terminal session and type `cdwork.sh` and you will have a number of useful commands
|
||||
that handle paths and special build parameters to make the code locations work without hard coding them anywhere.
|
||||
3
scripts/run.sh
Executable file
3
scripts/run.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env zsh
|
||||
reset
|
||||
go run -tags local -gcflags "all=-trimpath=$INDRAROOT" $1 --logs-level=trace $2 $3 $4 $5
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env zsh
|
||||
reset
|
||||
go test -v -tags local -gcflags "all=-trimpath=/home/loki/work/loki/indra-labs/indra" $1 $2 $3 $4 $5
|
||||
go test -v -tags local -gcflags "all=-trimpath=$INDRAROOT" $1 $2 $3 $4 $5
|
||||
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env zsh
|
||||
cd pkg
|
||||
go test -v -tags local -gcflags "all=-trimpath=/home/loki/work/loki/indra-labs/indra" ./...
|
||||
go test -v -tags local -gcflags "all=-trimpath=$INDRAROOT" ./...
|
||||
3
scripts/trace.sh
Executable file
3
scripts/trace.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env zsh
|
||||
reset
|
||||
go run -tags local -gcflags "all=-trimpath=$INDRAROOT" $1 $2 $3 $4 $5
|
||||
Reference in New Issue
Block a user