@@ -105,21 +105,6 @@ if __name__ == '__main__':
105105 body ['receive_user' ] = user
106106 body ['receive_repo' ] = app
107107 body ['image' ] = target_image
108- body ['url' ] = 'http://localhost/to/be/deprecated'
109- # extract the Procfile and convert to JSON
110- if os .path .exists (procfile ):
111- with open (procfile ) as f :
112- raw_procfile = f .read ()
113- body ['procfile' ] = json .dumps (yaml .safe_load (raw_procfile ))
114- body ['size' ] = os .stat (slug_path ).st_size
115- # calculate sha256
116- sha256 = hashlib .sha256 ()
117- with open (slug_path ) as f :
118- for chunk in iter (lambda : f .read (128 ), b'' ):
119- sha256 .update (chunk )
120- # use sha of master
121- with open (os .path .join (repo_dir , 'refs/heads/master' )) as f :
122- body ['sha' ] = f .read ().strip ('\n ' )
123108 # trigger build hook
124109 sys .stdout .write ('\n Launching... ' )
125110 sys .stdout .flush ()
@@ -129,15 +114,15 @@ if __name__ == '__main__':
129114 if r .status_code != 200 :
130115 raise Exception ('Build hook error: {} {}' .format (r .status_code , r .text ))
131116 # write out results for git user
132- databag = r .json ()
133- sys .stdout .write ('done, v{version}\n \n ' .format (** databag ['release' ]))
117+ response = r .json ()
118+ sys .stdout .write ('done, v{version}\n \n ' .format (** response ['release' ]))
134119 print ("-----> {app} deployed to Deis" .format (** locals ()))
135- domains = databag .get ('domains' , [])
120+ domains = response .get ('domains' , [])
136121 if domains :
137122 for domain in domains :
138123 print (" http://{domain}" .format (** locals ()))
139124 else :
140- print (' No proxy nodes found for this formation. \n ' )
125+ print (' No domains found for this application ' )
141126 print ('\n To learn more, use `deis help` or visit http://deis.io\n ' )
142127 except Exception as e :
143128 print (e .message )
0 commit comments