Skip to content

Commit

Permalink
fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
wenovus committed Nov 11, 2023
1 parent 1f3bf43 commit 21aea07
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cmd_gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ script_options=(
)
function run-dir() {
declare prefix="$workdir"/"$1"=="$2"==
outdir=$GOPATH/src/"$1"."$2"/
outdir=$GOPATH/src/ygot/"$1"."$2"/
mkdir "$outdir"
local options=( -output_file="$outdir"/oc.go "${options[@]}" )
shift 2
Expand Down Expand Up @@ -264,7 +264,7 @@ script_options=(
)
function run-dir() {
declare prefix="$workdir"/"$1"=="$2"==
outdir=$GOPATH/src/"$1"."$2"
outdir=$GOPATH/src/ygnmi/"$1"."$2"
mkdir "$outdir"
local options=( --output_dir="${outdir}"/oc --base_package_path="$1"."$2"/oc "${options[@]}" )
shift 2
Expand All @@ -276,7 +276,7 @@ function run-dir() {
go mod init &>> ${prefix}pass || status=1
go mod tidy &>> ${prefix}pass || status=1
goimports -w *.go &>> ${prefix}pass || status=1
go build &>> ${prefix}pass || status=1
go build ./... &>> ${prefix}pass || status=1
fi
if [[ $status -eq "1" ]]; then
mv ${prefix}pass ${prefix}fail
Expand Down
6 changes: 3 additions & 3 deletions cmd_gen/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ script_options=(
)
function run-dir() {
declare prefix="$workdir"/"$1"=="$2"==
outdir=$GOPATH/src/"$1"."$2"/
outdir=$GOPATH/src/ygot/"$1"."$2"/
mkdir "$outdir"
local options=( -output_file="$outdir"/oc.go "${options[@]}" )
shift 2
Expand Down Expand Up @@ -238,7 +238,7 @@ script_options=(
)
function run-dir() {
declare prefix="$workdir"/"$1"=="$2"==
outdir=$GOPATH/src/"$1"."$2"
outdir=$GOPATH/src/ygnmi/"$1"."$2"
mkdir "$outdir"
local options=( --output_dir="${outdir}"/oc --base_package_path="$1"."$2"/oc "${options[@]}" )
shift 2
Expand All @@ -250,7 +250,7 @@ function run-dir() {
go mod init &>> ${prefix}pass || status=1
go mod tidy &>> ${prefix}pass || status=1
goimports -w *.go &>> ${prefix}pass || status=1
go build &>> ${prefix}pass || status=1
go build ./... &>> ${prefix}pass || status=1
fi
if [[ $status -eq "1" ]]; then
mv ${prefix}pass ${prefix}fail
Expand Down

0 comments on commit 21aea07

Please sign in to comment.