Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: incorrect subprocess-calls in version_management #532

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ Changelog

-------------------------------

8.11.4
------
* bugfix: incorrect subprocess-calls in version_management

8.11.3
------
* bugfix: 0 contrasts argument overwritten for trainingCW
Expand Down
2 changes: 1 addition & 1 deletion iblrig/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 3) Check CI and eventually wet lab test
# 4) Pull request to iblrigv8
# 5) git tag the release in accordance to the version number below (after merge!)
__version__ = '8.11.3'
__version__ = '8.11.4'

# The following method call will try to get post-release information (i.e. the number of commits since the last tagged
# release corresponding to the one above), plus information about the state of the local repository (dirty/broken)
Expand Down
7 changes: 4 additions & 3 deletions iblrig/version_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ def get_remote_tags() -> None:
if not IS_GIT:
log.error('This installation of iblrig is not managed through git')
try:

check_call(["git", "fetch", "origin", get_branch(), "-t", "-q"], cwd=BASE_DIR, timeout=5)
except (SubprocessError, CalledProcessError):
return
Expand Down Expand Up @@ -263,7 +264,7 @@ def get_remote_version() -> Union[version.Version, None]:

def is_dirty() -> bool:
try:
return check_call(["git", "diff", "--quiet"]) != 0
return check_call(["git", "diff", "--quiet"], cwd=BASE_DIR) != 0
except CalledProcessError:
return True

Expand Down Expand Up @@ -324,8 +325,8 @@ def upgrade() -> int:
print('There are changes in your local copy of IBLRIG that will be lost when upgrading.')
if not ask_user('Do you want to proceed?', False):
return 0
check_call([sys.executable, "-m", "git", "reset", "--hard"])
check_call(["git", "reset", "--hard"], cwd=BASE_DIR)

check_call(["git", "pull", "--tags"])
check_call(["git", "pull", "--tags"], cwd=BASE_DIR)
check_call([sys.executable, "-m", "pip", "install", "-U", "pip"])
check_call([sys.executable, "-m", "pip", "install", "-U", "-e", "."])