@@ -153,12 +153,6 @@ func (c *viamClient) generateModuleAction(cCtx *cli.Context, args generateModule
153
153
warningf (cCtx .App .ErrWriter , err .Error ())
154
154
nonFatalError = true
155
155
}
156
-
157
- s .Title ("Generating cloud build requirements..." )
158
- if err = generateCloudBuild (cCtx , * newModule , globalArgs ); err != nil {
159
- warningf (cCtx .App .ErrWriter , err .Error ())
160
- nonFatalError = true
161
- }
162
156
}
163
157
164
158
if globalArgs .Debug {
@@ -743,32 +737,6 @@ func getLatestSDKTag(c *cli.Context, language string, globalArgs globalArgs) (st
743
737
return version , nil
744
738
}
745
739
746
- func generateCloudBuild (c * cli.Context , module modulegen.ModuleInputs , globalArgs globalArgs ) error {
747
- debugf (c .App .Writer , globalArgs .Debug , "Setting cloud build functionality to %v" , module .EnableCloudBuild )
748
- switch module .Language {
749
- case python :
750
- if module .EnableCloudBuild {
751
- err := os .Remove (filepath .Join (module .ModuleName , "run.sh" ))
752
- if err != nil {
753
- return err
754
- }
755
- } else {
756
- err := os .Remove (filepath .Join (module .ModuleName , "build.sh" ))
757
- if err != nil {
758
- return err
759
- }
760
- }
761
- case golang :
762
- if module .EnableCloudBuild {
763
- err := os .Remove (filepath .Join (module .ModuleName , "run.sh" ))
764
- if err != nil {
765
- return err
766
- }
767
- }
768
- }
769
- return nil
770
- }
771
-
772
740
func createModuleAndManifest (cCtx * cli.Context , c * viamClient , module modulegen.ModuleInputs , globalArgs globalArgs ) error {
773
741
var moduleID moduleID
774
742
if module .RegisterOnApp {
@@ -846,29 +814,25 @@ func renderManifest(c *cli.Context, moduleID string, module modulegen.ModuleInpu
846
814
}
847
815
switch module .Language {
848
816
case python :
817
+ manifest .Build = & manifestBuildInfo {
818
+ Setup : "./setup.sh" ,
819
+ Build : "./build.sh" ,
820
+ Path : "dist/archive.tar.gz" ,
821
+ Arch : []string {"linux/amd64" , "linux/arm64" },
822
+ }
849
823
if module .EnableCloudBuild {
850
- manifest .Build = & manifestBuildInfo {
851
- Setup : "./setup.sh" ,
852
- Build : "./build.sh" ,
853
- Path : "dist/archive.tar.gz" ,
854
- Arch : []string {"linux/amd64" , "linux/arm64" },
855
- }
856
824
manifest .Entrypoint = "dist/main"
857
825
} else {
858
826
manifest .Entrypoint = "./run.sh"
859
827
}
860
828
case golang :
861
- if module .EnableCloudBuild {
862
- manifest .Build = & manifestBuildInfo {
863
- Setup : "make setup" ,
864
- Build : "make module.tar.gz" ,
865
- Path : "bin/module.tar.gz" ,
866
- Arch : []string {"linux/amd64" , "linux/arm64" },
867
- }
868
- manifest .Entrypoint = fmt .Sprintf ("bin/%s" , module .ModuleName )
869
- } else {
870
- manifest .Entrypoint = "./run.sh"
829
+ manifest .Build = & manifestBuildInfo {
830
+ Setup : "make setup" ,
831
+ Build : "make module.tar.gz" ,
832
+ Path : "bin/module.tar.gz" ,
833
+ Arch : []string {"linux/amd64" , "linux/arm64" },
871
834
}
835
+ manifest .Entrypoint = fmt .Sprintf ("bin/%s" , module .ModuleName )
872
836
}
873
837
874
838
if err := writeManifest (filepath .Join (module .ModuleName , defaultManifestFilename ), manifest ); err != nil {
0 commit comments