浏览代码

Add verbosity to protogen

Sebastien L 3 年之前
父节点
当前提交
3a99c65eb3
共有 2 个文件被更改,包括 11 次插入8 次删除
  1. 6 6
      .github/workflows/esp-idf-v4.3-build.yml
  2. 5 2
      components/spotify/cspot/bell/nanopb/generator/protoc

+ 6 - 6
.github/workflows/esp-idf-v4.3-build.yml

@@ -47,12 +47,12 @@ jobs:
         key: ${{ runner.os }}-${{ matrix.node }}
     - name: Set build parameters
       run: |
-        git update-index --chmod=+x ./server_certs/getcert.sh
-        git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/protoc
-        git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/protoc-gen-nanopb
-        git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/*.py
-        git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/*.py2
-        git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/proto/*.py
+        git update-index --chmod=+x /project/server_certs/getcert.sh
+        git update-index --chmod=+x /project/components/spotify/cspot/bell/nanopb/generator/protoc
+        git update-index --chmod=+x /project/components/spotify/cspot/bell/nanopb/generator/protoc-gen-nanopb
+        git update-index --chmod=+x /project/components/spotify/cspot/bell/nanopb/generator/*.py
+        git update-index --chmod=+x /project/components/spotify/cspot/bell/nanopb/generator/*.py2
+        git update-index --chmod=+x /project/components/spotify/cspot/bell/nanopb/generator/proto/*.py
         
 
         cd server_certs;./getcert.sh;cat github.pem;cd ..

+ 5 - 2
components/spotify/cspot/bell/nanopb/generator/protoc

@@ -7,22 +7,25 @@ from nanopb_generator import invoke_protoc
 
 if __name__ == '__main__':
     # Add argument so that protoc-gen-nanopb gets found
+    print("Getting path to protoc-gen-nanopb")
     if getattr(sys, 'frozen', False):
         mypath = os.path.dirname(sys.executable) # For pyInstaller
     else:
         mypath = os.path.dirname(__file__)
-
+    print("Looking for executable file name")
     if os.path.isfile(os.path.join(mypath, "protoc-gen-nanopb.exe")):
         protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb.exe")
     elif os.name == 'nt':
         protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb.bat")
     else:
         protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb")
-
+    print("Found executable file name: " + protoc_gen_nanopb)
     args = sys.argv[1:]
 
     if os.path.isfile(protoc_gen_nanopb):
          args = ['--plugin=protoc-gen-nanopb=%s' % protoc_gen_nanopb] + args
 
+    # print the command line that we are about to execute
+    print("invoking protoc with parameters: ".join(args))
     status = invoke_protoc(['protoc'] + args)
     sys.exit(status)