Skip to content

Commit

Permalink
[修复] 修复"buildpkg.exe make https://github.com/cloudwu/cstring"处理错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
liu2guang committed Sep 26, 2018
1 parent 83740c3 commit 4314bce
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
/*.bat
/packages
packages/*.*
/Todo.txt
Binary file modified buildpkg.exe
Binary file not shown.
21 changes: 15 additions & 6 deletions buildpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def _load_config(filename):
else:
_run_log.info("N")
_run_log.info("Please modify config.json correctly before running buildpkg.")
exit(1)
sys.exit("sorry, goodbye!")

_run_log.info("Fix the config.json file contents.")

Expand Down Expand Up @@ -242,7 +242,7 @@ def _check_self():
# 4. check if License file exists
if os.path.exists("LICENSE") == False:
_run_log.info("Please do not delete the license, otherwise you will not be able to use buildpkg!")
exit(1)
sys.exit("sorry, goodbye!")

# 5. check if the library generated by the license is installed
try:
Expand All @@ -262,7 +262,7 @@ def _check_self():
file_path = os.path.join(_buildpkg_template_path, str(file_name))
if os.path.exists(file_path) == False:
_run_log.info("The template file [%s] does not exist and exit." % (file_name))
exit(1)
sys.exit("sorry, goodbye!")

_run_log.info("To complete self-check, and load config form [config.json] file.")

Expand Down Expand Up @@ -359,7 +359,7 @@ def _make_package(pkgname, version = None, license = None):
global _buildpkg_packages_path
global _buildpkg_packages_xxx_path
global _buildpkg_packages_xxx_example_path
global _buildpkg_packages_xxx_scripts_path
global _buildpkg_packages_xxx_scripts_path

if _BUILDPKG_RELEASE == False:
if os.path.exists(_buildpkg_packages_xxx_path) == True:
Expand Down Expand Up @@ -473,7 +473,7 @@ def _update_package(pkgname, version = None, license = None):

if _package_config == None:
_run_log.error("The [%s] package was not found, exit buildpkg update." % (pkgname))
exit(1)
sys.exit("sorry, goodbye!")

_replace_list = {
"username" : _config["username"],
Expand Down Expand Up @@ -551,6 +551,10 @@ def main():
if _args.action == "make":
# 4.1. make package
if _args.pkgrepo == None:
if str(_args.pkgname).find(".git") != -1 or str(_args.pkgname).find("http://") != -1 or str(_args.pkgname).find("https://") != -1:
_run_log.error("The %s is a url! Please input package name" % (_args.pkgname))
sys.exit("sorry, goodbye!")

_make_package(_args.pkgname, _args.version, _args.license)
_commit_git(_args.pkgname, _config["commit_content"])
# 4.2. transplant package
Expand All @@ -566,4 +570,9 @@ def main():
_pkg_log.info("To complete to update package [%s]!" % (_args.pkgname))

if __name__ == "__main__":
main()
try:
main()
except:
_pkg_log.exception(sys.exc_info())
sys.exit("sorry, goodbye!")

Binary file modified figures/logo.ico
Binary file not shown.

0 comments on commit 4314bce

Please sign in to comment.