internal: fix generator Makefile
Each makefile line is run in its own sub-shell, so putting `cd -` would fail
since there was no OLDPWD. This change puts it on the same line.
Also excludes sed backup files that get generated by the generator script.
Change-Id: I0e628938e343b83526dd34242ec2d1cbfcc32a42
Reviewed-on: https://code-review.googlesource.com/c/google-api-go-client/+/45151
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/.gitignore b/.gitignore
index 50d2a9b..c643732 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,7 @@
+# ignore sed backup files
+*-r
+*-e
+
_obj/
*_testmain.go
clientid.dat
@@ -9,4 +13,4 @@
*~
*.out
*.test
-*.exe
+*.exe
\ No newline at end of file
diff --git a/google-api-go-generator/Makefile b/google-api-go-generator/Makefile
index 32fd5bb..029beb9 100644
--- a/google-api-go-generator/Makefile
+++ b/google-api-go-generator/Makefile
@@ -7,10 +7,9 @@
# Download all API specifications and rebuild Go bindings.
# All downloaded files are cached in $TMPDIR for reuse with 'cached' below.
+all: SHELL:=/bin/bash
all: $(GENERATOR)
- cd ../internal/version
- go generate
- cd -
+ cd ../internal/version; go generate
$(GENERATOR) -cache=false -install -api=* -gendir=..
go test . -v