Skip to content
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
7 changes: 5 additions & 2 deletions unity_app_generator/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@
# Defaulty name of place where application generation state data is kept
DEFAULT_STATE_DIRECTORY = ".unity_app_gen"

def state_directory_path(state_directory=None):
def state_directory_path(state_directory=None, destination_directory=None):
"Resolve a path to the state directory based on which arguments are provided"

if state_directory is not None:
return os.path.realpath(state_directory)

if destination_directory is not None:
return os.path.realpath(os.path.join(destination_directory, DEFAULT_STATE_DIRECTORY))

return os.path.realpath(os.path.join(os.curdir, DEFAULT_STATE_DIRECTORY))

Expand All @@ -33,7 +36,7 @@ def check_state_directory(state_dir):
def init(state_directory, source_repository, destination_directory=None, checkout=None, **kwargs):
"Initialize a Git repository for use by subsequent commands"

state_dir = state_directory_path(state_directory)
state_dir = state_directory_path(state_directory, destination_directory)

app_gen = UnityApplicationGenerator(state_dir, source_repository, destination_directory, checkout)

Expand Down
2 changes: 1 addition & 1 deletion unity_app_generator/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__="1.1.0"
__version__="1.1.1"