Skip to content

Commit

Permalink
fix: compatibility with older git (#227)
Browse files Browse the repository at this point in the history
* fix: compatibility with older git

* update process including branch

* getting it right now I think
  • Loading branch information
sebhoerl authored Apr 19, 2024
1 parent b0c45cc commit 3a4b23b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions matsim/runtime/eqasim.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import matsim.runtime.maven as maven

DEFAULT_EQASIM_VERSION = "1.3.1"
DEFAULT_EQASIM_BRANCH = "develop"
DEFAULT_EQASIM_COMMIT = "7cbe85b"

def configure(context):
Expand All @@ -14,8 +15,8 @@ def configure(context):
context.stage("matsim.runtime.maven")

context.config("eqasim_version", DEFAULT_EQASIM_VERSION)
context.config("eqasim_branch", DEFAULT_EQASIM_BRANCH)
context.config("eqasim_commit", DEFAULT_EQASIM_COMMIT)
context.config("eqasim_tag", None)
context.config("eqasim_repository", "https://github.com/eqasim-org/eqasim-java.git")
context.config("eqasim_path", "")

Expand All @@ -36,19 +37,18 @@ def execute(context):
# Normal case: we clone eqasim
if context.config("eqasim_path") == "":
# Clone repository and checkout version
branch = context.config("eqasim_branch")

git.run(context, [
"clone", context.config("eqasim_repository"),
"--filter=tree:0", "eqasim-java"
"clone", "--single-branch", "-b", branch,
context.config("eqasim_repository"), "eqasim-java"
])

# Select the configured commit or tag
commit = context.config("eqasim_commit")
tag = context.config("eqasim_tag")
checkout = commit if commit is not None else tag
assert checkout is not None

git.run(context, [
"checkout", checkout
"checkout", commit
], cwd = "{}/eqasim-java".format(context.path()))

# Build eqasim
Expand Down

0 comments on commit 3a4b23b

Please sign in to comment.