![Demo](http://gogs.qiniudn.com/gogs_demo.gif)
-##### Current version: 0.6.4 Beta
+##### Current version: 0.6.5 Beta
### NOTICES
}
func createUpdateHook(repoPath string) error {
- return ioutil.WriteFile(path.Join(repoPath, "hooks/update"),
+ hookPath := path.Join(repoPath, "hooks/update")
+ os.MkdirAll(path.Dir(hookPath), os.ModePerm)
+ return ioutil.WriteFile(hookPath,
[]byte(fmt.Sprintf(_TPL_UPDATE_HOOK, setting.ScriptType, "\""+appPath+"\"", setting.CustomConf)), 0777)
}