diff --git a/src/cpl/cpl.json b/src/cpl/cpl.json index 4eb54c90..68611e9c 100644 --- a/src/cpl/cpl.json +++ b/src/cpl/cpl.json @@ -36,7 +36,7 @@ "BuildSettings": { "ProjectType": "library", "SourcePath": "", - "OutputPath": "dist", + "OutputPath": "../../dist", "Main": "", "EntryPoint": "cpl", "IncludePackageData": true, diff --git a/src/cpl_cli/cpl_cli.json b/src/cpl_cli/cpl_cli.json index 6c2c2d62..4aaf2360 100644 --- a/src/cpl_cli/cpl_cli.json +++ b/src/cpl_cli/cpl_cli.json @@ -25,7 +25,7 @@ "BuildSettings": { "ProjectType": "console", "SourcePath": "", - "OutputPath": "dist", + "OutputPath": "../../dist", "Main": "main", "EntryPoint": "cpl", "IncludePackageData": true, diff --git a/src/cpl_cli/publish/publisher_service.py b/src/cpl_cli/publish/publisher_service.py index 95f8e0cc..5bcf0e81 100644 --- a/src/cpl_cli/publish/publisher_service.py +++ b/src/cpl_cli/publish/publisher_service.py @@ -148,7 +148,7 @@ class PublisherService(PublisherABC): elif os.path.isfile(rel_path): self._included_files.append(rel_path) - for r, d, f in os.walk(self._build_settings.source_path): + for r, d, f in os.walk(self._source_path): for file in f: relative_path = os.path.relpath(r) file_path = os.path.join(relative_path, os.path.relpath(file)) @@ -201,6 +201,7 @@ class PublisherService(PublisherABC): if len(module_py_lines) > 0: imports = '\n'.join(module_py_lines) + Console.write_line(self._project_settings.version.to_str()) template_content = stringTemplate(InitTemplate.get_init_py()).substitute( Name=self._project_settings.name, Description=self._project_settings.description, @@ -385,7 +386,7 @@ class PublisherService(PublisherABC): 3. Copies all included source files to dist_path/build :return: """ - self._output_path = os.path.join(self._output_path, 'build') + self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'build')) Console.spinner('Reading source files:', self._read_sources, text_foreground_color=ForegroundColorEnum.green, spinner_foreground_color=ForegroundColorEnum.blue) diff --git a/src/cpl_cli/startup.py b/src/cpl_cli/startup.py index 28661067..a408abd7 100644 --- a/src/cpl_cli/startup.py +++ b/src/cpl_cli/startup.py @@ -40,7 +40,9 @@ class Startup(StartupABC): self._configuration.add_environment_variables('CPL_') self._configuration.add_json_file('appsettings.json', path=self._env.runtime_directory, optional=False, output=False) - self._configuration.add_console_argument(ConsoleArgument('', 'build', ['b', 'B'], '')) + self._configuration.add_console_argument( + ConsoleArgument('', 'build', ['b', 'B'], ' ', is_value_token_optional=True) + ) self._configuration.add_console_argument(ConsoleArgument('', 'generate', ['g', 'G'], '', console_arguments=[ ConsoleArgument('', 'abc', ['a', 'A'], ' '), ConsoleArgument('', 'class', ['c', 'C'], ' '),