Skip to content

Commit

Permalink
1. disable version check temply (#6)
Browse files Browse the repository at this point in the history
2. add flag that whether module is run in pycharm
3. bump version to 1.3.1-rc.0
  • Loading branch information
zlrs authored Sep 4, 2020
1 parent 93befea commit f753301
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion xc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.3.0'
__version__ = '1.3.1-rc.0'
5 changes: 5 additions & 0 deletions xc/utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import sys


def isRunInPycharm():
return sys.gettrace() is None
6 changes: 4 additions & 2 deletions xc/version_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,10 @@ def initVersionCheck(file_path):


def run():
if shouldCheckVersion():
checkVersion()
pass
# 由于切换到PyPI发布,之前的version_check逻辑需要调整。暂时先下掉这个模块。
# if shouldCheckVersion():
# checkVersion()


if __name__ == '__main__':
Expand Down
4 changes: 2 additions & 2 deletions xc/xc.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from xc import version_check
from xc.logger import printInfo, printExecute, printError
from xc.derived_data_clearner import removeProjectDerivedData
from xc.utils import isRunInPycharm
from . import __version__


Expand Down Expand Up @@ -94,8 +95,7 @@ def xc(path, rm_all, rm_build, rm_index, version):
Contribute: https://github.com/zlrs/xcode-opener
"""
DEBUG = 1
if DEBUG:
if isRunInPycharm():
print(f"rm_all: {rm_all}, rm_build: {rm_build}, rm_index: {rm_index}, version: {version}")

if version:
Expand Down

0 comments on commit f753301

Please sign in to comment.