Skip to content

Commit

Permalink
feat: renamed app kind script to exec
Browse files Browse the repository at this point in the history
  • Loading branch information
akelch committed Apr 17, 2023
1 parent 6e28a62 commit 62978a7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

This file documents any relevant changes.

## [1.0.0] 2023-04.13
## [1.0.1] 2023-04-17
- fix: renamed app kind from `script` to `exec`
- fix: scriptor cli

## [1.0.0] 2023-04-13
- feat: added `viur build app [NAME]` command which build a specific app
- feat: new app type `script`
- feat: `viur install vi` can now have an optional --target parameter
Expand Down
4 changes: 2 additions & 2 deletions src/viur_cli/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def release(name, additional_args):
utils.echo_info(f"- Building {name}")
os.system(f'cd {cfg["sources_folder"]}{builds_cfg[name]["source"]} && npm install && npm run {builds_cfg[name]["command"]}')
# build all scripts
if script_apps := [k for k, v in builds_cfg.items() if builds_cfg[k]["kind"] == "script"]:
if script_apps := [k for k, v in builds_cfg.items() if builds_cfg[k]["kind"] == "exec"]:
for name in script_apps:
utils.echo_info(f"- Building {name}")
os.system(builds_cfg[name]["command"])
Expand Down Expand Up @@ -120,7 +120,7 @@ def app(appname, additional_args):
utils.echo_info(f"- Building NPM: {appname}")
os.system(
f'cd {cfg["sources_folder"]}{builds_cfg["source"]} && npm install && npm run {builds_cfg["command"]}')
elif builds_cfg["kind"] == "script":
elif builds_cfg["kind"] == "exec":
utils.echo_info(f"- Building Script: {appname}")
os.system(builds_cfg["command"])

Expand Down
9 changes: 9 additions & 0 deletions src/viur_cli/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,15 @@ def update_config(path=None):
echo_info("viur-cli tries to find npm applications")
add_npm_apps()

##################### Version 1.1.1

if projectConfig["default"]["format"] == "1.1.0":
projectConfig["default"]["format"] = "1.1.1"
builds = projectConfig["default"]["builds"].copy()
for k, v in builds.items():
if builds[k]["kind"] == "script":
builds[k]["kind"] = "exec"

# conf updates must increase format version
write_config(projectConfig, path)

Expand Down
2 changes: 1 addition & 1 deletion src/viur_cli/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.0.0"
__version__ = "1.0.1"

0 comments on commit 62978a7

Please sign in to comment.