shipit-cli 0.9.1__py3-none-any.whl → 0.10.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
shipit/assets/php/php.ini CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [PHP]
4
4
  engine = On
5
- short_open_tag = Off
5
+ short_open_tag = On
6
6
  precision = 14
7
7
  output_buffering = 4096
8
8
  zlib.output_compression = Off
@@ -22,6 +22,8 @@ error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
22
22
  display_errors = Off
23
23
  display_startup_errors = Off
24
24
  log_errors = On
25
+ access_log = /dev/stdout
26
+ error_log = /dev/stderr
25
27
  ignore_repeated_errors = Off
26
28
  ignore_repeated_source = Off
27
29
  report_memleaks = On
@@ -1,19 +1,20 @@
1
- # Needed to get the WP-CLI commands to avoid asking for the TTY size, which
2
- # doesn't work because we don't have the stty command it uses.
3
- export COLUMNS=80
1
+ # Needed to get the WP-CLI commands to avoid asking for the TTY size
2
+ IFS=$'\n\t'
3
+
4
+ export COLUMNS=80 # Prevent WP-CLI from asking for TTY size
5
+ export PAGER="cat"
6
+
7
+ echo "🚀 Starting WordPress setup..."
4
8
 
5
9
  echo "Creating required directories..."
6
10
 
7
11
  mkdir -p wp-content/plugins
8
- echo "" > wp-content/plugins/.keep
9
-
10
12
  mkdir -p wp-content/upgrade
11
- echo "" > wp-content/upgrade/.keep
12
13
 
13
- echo "Installing WordPress core..."
14
+ echo "Installing WordPress core"
14
15
 
15
16
  wp core install \
16
- --url="$WASMER_APP_URL" \
17
+ --url="$WP_SITEURL" \
17
18
  --title="$WP_SITE_TITLE" \
18
19
  --admin_user="$WP_ADMIN_USERNAME" \
19
20
  --admin_password="$WP_ADMIN_PASSWORD" \
@@ -21,8 +22,63 @@ wp core install \
21
22
  --locale="$WP_LOCALE"
22
23
 
23
24
 
24
- if [ -z "$WP_UPDATE_DB" ]; then
25
+ if [ "${WP_UPDATE_DB:-false}" = "true" ]; then
26
+ echo "Updating database..."
25
27
  wp core update-db
26
28
  fi
27
29
 
28
- echo "Installation complete"
30
+ # Install plugins from WP_PLUGINS environment variable
31
+ if [ -n "${WP_PLUGINS:-}" ]; then
32
+ echo "Installing plugins from WP_PLUGINS: $WP_PLUGINS"
33
+
34
+ IFS=',' # Split by commas
35
+ for PLUGIN_ENTRY in $WP_PLUGINS; do
36
+ if [[ "$PLUGIN_ENTRY" =~ ^https?:// ]]; then
37
+ echo "Installing plugin from URL: $PLUGIN_ENTRY"
38
+ wp plugin install "$PLUGIN_ENTRY" --activate
39
+ else
40
+ # Extract name and version using parameter expansion
41
+ PLUGIN_NAME="${PLUGIN_ENTRY%%:*}"
42
+ PLUGIN_VERSION="${PLUGIN_ENTRY#*:}"
43
+
44
+ if [[ "$PLUGIN_NAME" == "$PLUGIN_VERSION" ]]; then
45
+ echo "Installing plugin '${PLUGIN_NAME}' (latest version)..."
46
+ wp plugin install "$PLUGIN_NAME" --activate
47
+ else
48
+ echo "Installing plugin '${PLUGIN_NAME}' (version: ${PLUGIN_VERSION})..."
49
+ wp plugin install "$PLUGIN_NAME" --version="$PLUGIN_VERSION" --activate
50
+ fi
51
+ fi
52
+ done
53
+ fi
54
+
55
+ # Install themes from WP_THEMES environment variable
56
+ if [ -n "${WP_THEMES:-}" ]; then
57
+ echo "🎨 Installing themes from WP_THEMES: $WP_THEMES"
58
+ IFS=','
59
+
60
+ for THEME_ENTRY in $WP_THEMES; do
61
+ if [[ "$THEME_ENTRY" =~ ^https?:// ]]; then
62
+ echo "Installing theme from URL: $THEME_ENTRY"
63
+ wp theme install "$THEME_ENTRY"
64
+ else
65
+ THEME_NAME="${THEME_ENTRY%%:*}"
66
+ THEME_VERSION="${THEME_ENTRY#*:}"
67
+
68
+ if [[ "$THEME_NAME" == "$THEME_VERSION" ]]; then
69
+ echo "Installing theme '${THEME_NAME}' (latest version)..."
70
+ wp theme install "$THEME_NAME"
71
+ else
72
+ echo "Installing theme '${THEME_NAME}' (version: ${THEME_VERSION})..."
73
+ wp theme install "$THEME_NAME" --version="$THEME_VERSION"
74
+ fi
75
+ fi
76
+ done
77
+ fi
78
+
79
+ if [ -n "${WP_DEFAULT_THEME:-}" ]; then
80
+ echo "Activating default theme: $WP_DEFAULT_THEME"
81
+ wp theme activate "$WP_DEFAULT_THEME"
82
+ fi
83
+
84
+ echo "✅ WordPress Installation complete"
@@ -21,20 +21,24 @@ define( 'WP_AUTO_UPDATE_CORE', false); // Disable automatic aupdates and checks
21
21
  * @package WordPress
22
22
  */
23
23
 
24
-
25
24
  function get_env_var(string $name, string $default = ''): string
26
25
  {
27
26
  if (isset($_ENV[$name])) {
28
27
  return $_ENV[$name];
29
28
  }
30
29
 
31
- $stderr = fopen("php://stderr", "wb");
32
- fwrite($stderr, "Configuration error: environment variable " . $name . " not provided. Using default value: " . $default . PHP_EOL);
33
- fclose($stderr);
30
+ if ($default === '') {
31
+ error_log("Configuration error: environment variable " . $name . " not provided.");
32
+ }
34
33
 
35
34
  return $default;
36
35
  }
37
36
 
37
+ function get_env_var_bool(string $name, bool $default = false): bool
38
+ {
39
+ return in_array(get_env_var($name, $default ? "1" : "0"), ["1", "true", "yes", "on", "y"], true);
40
+ }
41
+
38
42
  // ** Database settings - You can get this info from your web host ** //
39
43
  /** The name of the database for WordPress */
40
44
  define( 'DB_NAME', get_env_var('DB_NAME', 'wordpress') );
@@ -85,14 +89,14 @@ define('NONCE_SALT', get_env_var('NONCE_SALT', 'no secret provided'));
85
89
  $scheme = isset( $_SERVER['HTTPS'] ) && '1' === (string) $_SERVER['HTTPS'] ? "https://" : "http://";
86
90
 
87
91
  if (!defined('WP_HOME')) {
88
- define( 'WP_HOME', isset($_SERVER['HTTP_HOST']) ? ($scheme . $_SERVER['HTTP_HOST'] ): "http://localhost");
92
+ define( 'WP_HOME', get_env_var('WP_HOME', isset($_SERVER['HTTP_HOST']) ? ($scheme . $_SERVER['HTTP_HOST'] ): "http://localhost"));
89
93
  }
90
94
 
91
- define( 'WP_SITEURL', WP_HOME . '/' );
95
+ define( 'WP_SITEURL', get_env_var('WP_SITEURL', WP_HOME . '/') );
92
96
 
93
- define( 'WP_MEMORY_LIMIT', '256M' );
94
- define( 'WP_MAX_MEMORY_LIMIT', '256M' );
95
- define( 'WP_POST_REVISIONS', false );
97
+ define( 'WP_MEMORY_LIMIT', get_env_var('WP_MEMORY_LIMIT', '256M') );
98
+ define( 'WP_MAX_MEMORY_LIMIT', get_env_var('WP_MAX_MEMORY_LIMIT', '256M') );
99
+ define( 'WP_POST_REVISIONS', get_env_var_bool('WP_POST_REVISIONS', false));
96
100
 
97
101
  /**#@-*/
98
102
 
@@ -116,11 +120,20 @@ $table_prefix = 'wp_';
116
120
  *
117
121
  * @link https://wordpress.org/support/article/debugging-in-wordpress/
118
122
  */
119
- define( 'WP_DEBUG', false );
123
+ define( 'WP_DEBUG', get_env_var_bool('WP_DEBUG', false) );
120
124
 
121
125
  /* Add any custom values between this line and the "stop editing" line. */
122
126
 
127
+ // Optionally include an additional wp-config.php file if defined
128
+ if ( getenv('WP_ADDITIONAL_CONFIG') ) {
129
+ $extra_config_path = getenv('WP_ADDITIONAL_CONFIG');
123
130
 
131
+ if ( file_exists( $extra_config_path ) ) {
132
+ require_once $extra_config_path;
133
+ } else {
134
+ error_log( "WP_ADDITIONAL_CONFIG defined but file not found: {$extra_config_path}" );
135
+ }
136
+ }
124
137
 
125
138
  /* That's all, stop editing! Happy publishing. */
126
139
 
shipit/cli.py CHANGED
@@ -90,6 +90,8 @@ class Package:
90
90
  version: Optional[str] = None
91
91
 
92
92
  def __str__(self) -> str: # pragma: no cover - simple representation
93
+ if self.version is None:
94
+ return self.name
93
95
  return f"{self.name}@{self.version}"
94
96
 
95
97
 
@@ -298,14 +300,15 @@ class DockerBuilder:
298
300
  # "--mount",
299
301
  # f"type=volume,source={vol.name},target={str(vol.serve_path)}",
300
302
  # ]
301
- return sh.Command(
302
- "docker"
303
- )(
303
+ return sh.Command("docker")(
304
304
  *docker_args,
305
305
  image_name,
306
306
  command,
307
307
  *(extra_args or []),
308
- _env={"DOCKER_BUILDKIT": "1", **os.environ}, # Pass the current environment variables to the Docker client
308
+ _env={
309
+ "DOCKER_BUILDKIT": "1",
310
+ **os.environ,
311
+ }, # Pass the current environment variables to the Docker client
309
312
  _out=write_stdout,
310
313
  _err=write_stderr,
311
314
  )
@@ -439,10 +442,18 @@ RUN curl https://mise.run | sh
439
442
  raise Exception(f"Asset {step.source} does not exist")
440
443
  else:
441
444
  if step.ignore:
442
- exclude = " \\\n" +" \\\n".join([f" --exclude={ignore}" for ignore in step.ignore]) + " \\\n "
445
+ exclude = (
446
+ " \\\n"
447
+ + " \\\n".join(
448
+ [f" --exclude={ignore}" for ignore in step.ignore]
449
+ )
450
+ + " \\\n "
451
+ )
443
452
  else:
444
453
  exclude = ""
445
- self.docker_file_contents += f"COPY{exclude} {step.source} {step.target}\n"
454
+ self.docker_file_contents += (
455
+ f"COPY{exclude} {step.source} {step.target}\n"
456
+ )
446
457
  elif isinstance(step, EnvStep):
447
458
  env_vars = " ".join(
448
459
  [f"{key}={value}" for key, value in step.variables.items()]
@@ -517,7 +528,9 @@ class LocalBuilder:
517
528
  def execute_step(self, step: Step, env: Dict[str, str]) -> None:
518
529
  build_path = self.workdir
519
530
  if isinstance(step, UseStep):
520
- console.print(f"[bold]Using dependencies:[/bold] {step.dependencies}")
531
+ console.print(
532
+ f"[bold]Using dependencies:[/bold] {', '.join([str(dep) for dep in step.dependencies])}"
533
+ )
521
534
  elif isinstance(step, WorkdirStep):
522
535
  console.print(f"[bold]Working in {step.path}[/bold]")
523
536
  self.workdir = step.path
@@ -560,17 +573,14 @@ class LocalBuilder:
560
573
  ignore_extra = (
561
574
  f" [bright_black]# ignoring {', '.join(step.ignore)}[/bright_black]"
562
575
  )
563
- if step.target == ".":
564
- console.print(f"[bold]Copy from {step.source}[/bold]{ignore_extra}")
565
- else:
566
- console.print(
567
- f"[bold]Copy to {step.target} from {step.source}[/bold]{ignore_extra}"
568
- )
569
576
  ignore_matches = step.ignore if step.ignore else []
570
577
  ignore_matches.append(".shipit")
571
578
  ignore_matches.append("Shipit")
572
579
 
573
580
  if step.is_download():
581
+ console.print(
582
+ f"[bold]Download from {step.source} to {step.target}[/bold]"
583
+ )
574
584
  download_file(step.source, (build_path / step.target))
575
585
  else:
576
586
  if step.base == "source":
@@ -580,6 +590,10 @@ class LocalBuilder:
580
590
  else:
581
591
  raise Exception(f"Unknown base: {step.base}")
582
592
 
593
+ console.print(
594
+ f"[bold]Copy to {step.target} from {step.source}[/bold]{ignore_extra}"
595
+ )
596
+
583
597
  if (base / step.source).is_dir():
584
598
  copytree(
585
599
  (base / step.source),
@@ -607,7 +621,7 @@ class LocalBuilder:
607
621
  def build(
608
622
  self, env: Dict[str, str], mounts: List[Mount], steps: List[Step]
609
623
  ) -> None:
610
- console.print(f"\n[bold]Building package[/bold]")
624
+ console.print(f"\n[bold]Building... 🚀[/bold]")
611
625
  base_path = self.local_path
612
626
  shutil.rmtree(base_path, ignore_errors=True)
613
627
  base_path.mkdir(parents=True, exist_ok=True)
@@ -907,7 +921,7 @@ class WasmerBuilder:
907
921
  deps.append(Package("bash"))
908
922
 
909
923
  if deps:
910
- console.print(f"[bold]Mapping dependencies:[/bold]")
924
+ console.print(f"[bold]Mapping dependencies to Wasmer packages:[/bold]")
911
925
  for dep in deps:
912
926
  if dep.name in self.mapper:
913
927
  version = dep.version or "latest"
@@ -970,9 +984,7 @@ class WasmerBuilder:
970
984
  env.update(serve.env)
971
985
  if env:
972
986
  arr = array([f"{k}={v}" for k, v in env.items()]).multiline(True)
973
- wasi_args.add(
974
- "env", arr
975
- )
987
+ wasi_args.add("env", arr)
976
988
  title = string("annotations.wasi", literal=False)
977
989
  command.add(title, wasi_args)
978
990
 
@@ -1049,7 +1061,9 @@ class WasmerBuilder:
1049
1061
  )
1050
1062
  yaml_config["jobs"] = jobs
1051
1063
 
1052
- app_yaml = yaml.dump(yaml_config,)
1064
+ app_yaml = yaml.dump(
1065
+ yaml_config,
1066
+ )
1053
1067
 
1054
1068
  console.print(f"\n[bold]Created app.yaml manifest ✅[/bold]")
1055
1069
  app_yaml_panel = Panel(
@@ -1344,6 +1358,10 @@ def auto(
1344
1358
  None,
1345
1359
  help="Use a specific Docker client (such as depot, podman, etc.)",
1346
1360
  ),
1361
+ skip_docker_if_safe_build: Optional[bool] = typer.Option(
1362
+ True,
1363
+ help="Skip Docker if the build can be done safely locally (only copy commands).",
1364
+ ),
1347
1365
  skip_prepare: bool = typer.Option(
1348
1366
  False,
1349
1367
  help="Run the prepare command after building (defaults to True).",
@@ -1419,6 +1437,7 @@ def auto(
1419
1437
  wasmer=(wasmer or wasmer_deploy),
1420
1438
  docker=docker,
1421
1439
  docker_client=docker_client,
1440
+ skip_docker_if_safe_build=skip_docker_if_safe_build,
1422
1441
  wasmer_registry=wasmer_registry,
1423
1442
  wasmer_token=wasmer_token,
1424
1443
  wasmer_bin=wasmer_bin,
@@ -1628,6 +1647,10 @@ def build(
1628
1647
  None,
1629
1648
  help="Use a specific Docker client (such as depot, podman, etc.)",
1630
1649
  ),
1650
+ skip_docker_if_safe_build: Optional[bool] = typer.Option(
1651
+ True,
1652
+ help="Skip Docker if the build can be done safely locally (only copy commands).",
1653
+ ),
1631
1654
  env_name: Optional[str] = typer.Option(
1632
1655
  None,
1633
1656
  help="The environment to use (defaults to `.env`, it will use .env.<env_name> if provided)",
@@ -1684,6 +1707,28 @@ def build(
1684
1707
  "CLICOLOR": os.environ.get("CLICOLOR", "0"),
1685
1708
  }
1686
1709
  serve = next(iter(ctx.serves.values()))
1710
+
1711
+ if skip_docker_if_safe_build and serve.build and len(serve.build) > 0:
1712
+ # If it doesn't have a run step, then it's safe to skip Docker and run all the
1713
+ # steps locally.
1714
+ has_run = any(isinstance(step, RunStep) for step in serve.build)
1715
+ if not has_run:
1716
+ console.print(
1717
+ f"[bold]ℹ️ Building locally instead of Docker to speed up the build, as all commands are safe to run locally[/bold]"
1718
+ )
1719
+ return build(
1720
+ path,
1721
+ wasmer=wasmer,
1722
+ skip_prepare=skip_prepare,
1723
+ wasmer_bin=wasmer_bin,
1724
+ wasmer_registry=wasmer_registry,
1725
+ wasmer_token=wasmer_token,
1726
+ docker=False,
1727
+ docker_client=None,
1728
+ skip_docker_if_safe_build=False,
1729
+ env_name=env_name,
1730
+ )
1731
+
1687
1732
  serve.env = serve.env or {}
1688
1733
  if (path / ".env").exists():
1689
1734
  env_vars = dotenv_values(path / ".env")
@@ -1720,5 +1765,6 @@ def main() -> None:
1720
1765
  if __name__ == "__main__":
1721
1766
  main()
1722
1767
 
1768
+
1723
1769
  def flatten(xss):
1724
1770
  return [x for xs in xss for x in xs]
@@ -327,7 +327,7 @@ class NodeStaticProvider(StaticFileProvider):
327
327
  return None
328
328
 
329
329
  def mounts(self) -> list[MountSpec]:
330
- return [MountSpec("temp"), *super().mounts()]
330
+ return [MountSpec("temp", attach_to_serve=False), *super().mounts()]
331
331
 
332
332
  def volumes(self) -> list[VolumeSpec]:
333
333
  return []
shipit/providers/php.py CHANGED
@@ -29,7 +29,7 @@ class PhpProvider:
29
29
  def detect(cls, path: Path, custom_commands: CustomCommands) -> Optional[DetectResult]:
30
30
  if _exists(path, "composer.json") and _exists(path, "public/index.php"):
31
31
  return DetectResult(cls.name(), 60)
32
- if _exists(path, "index.php") and not _exists(path, "composer.json"):
32
+ if _exists(path, "index.php") or _exists(path, "public/index.php") or _exists(path, "app/index.php"):
33
33
  return DetectResult(cls.name(), 10)
34
34
  if custom_commands.start and custom_commands.start.startswith("php "):
35
35
  return DetectResult(cls.name(), 70)
@@ -92,9 +92,12 @@ class PhpProvider:
92
92
 
93
93
  def base_commands(self) -> Dict[str, str]:
94
94
  if _exists(self.path, "public/index.php"):
95
- return {"start": 'f"php -S localhost:{PORT} -t public"'}
95
+ return {"start": '"php -S localhost:{} -t {}/public".format(PORT, app["serve"])'}
96
+ elif _exists(self.path, "app/index.php"):
97
+ return {"start": '"php -S localhost:{} -t {}/app".format(PORT, app["serve"])'}
96
98
  elif _exists(self.path, "index.php"):
97
- return {"start": 'f"php -S localhost:{PORT} -t ."'}
99
+ return {"start": '"php -S localhost:{} -t {}".format(PORT, app["serve"])'}
100
+ return {}
98
101
 
99
102
  def mounts(self) -> list[MountSpec]:
100
103
  return [
@@ -37,14 +37,18 @@ class StaticFileProvider:
37
37
  return "staticfile"
38
38
 
39
39
  @classmethod
40
- def detect(cls, path: Path, custom_commands: CustomCommands) -> Optional[DetectResult]:
40
+ def detect(
41
+ cls, path: Path, custom_commands: CustomCommands
42
+ ) -> Optional[DetectResult]:
41
43
  if _exists(path, "Staticfile"):
42
44
  return DetectResult(cls.name(), 50)
43
45
  if _exists(path, "index.html") and not _exists(
44
46
  path, "package.json", "pyproject.toml", "composer.json"
45
47
  ):
46
48
  return DetectResult(cls.name(), 10)
47
- if custom_commands.start and custom_commands.start.startswith("static-web-server "):
49
+ if custom_commands.start and custom_commands.start.startswith(
50
+ "static-web-server "
51
+ ):
48
52
  return DetectResult(cls.name(), 70)
49
53
  return None
50
54
 
@@ -70,7 +74,9 @@ class StaticFileProvider:
70
74
  def build_steps(self) -> list[str]:
71
75
  return [
72
76
  'workdir(app["build"])',
73
- 'copy({}, ".", ignore=[".git"])'.format(json.dumps(self.config and self.config.get("root") or "."))
77
+ 'copy({}, ".", ignore=[".git"])'.format(
78
+ json.dumps(self.config and self.config.get("root") or ".")
79
+ ),
74
80
  ]
75
81
 
76
82
  def prepare_steps(self) -> Optional[list[str]]:
@@ -92,6 +98,6 @@ class StaticFileProvider:
92
98
 
93
99
  def env(self) -> Optional[Dict[str, str]]:
94
100
  return None
95
-
101
+
96
102
  def services(self) -> list[ServiceSpec]:
97
103
  return []
@@ -27,8 +27,14 @@ class WordPressProvider(PhpProvider):
27
27
  return "wordpress"
28
28
 
29
29
  @classmethod
30
- def detect(cls, path: Path, custom_commands: CustomCommands) -> Optional[DetectResult]:
31
- if _exists(path, "wp-content") and _exists(path, "index.php") and _exists(path, "wp-load.php"):
30
+ def detect(
31
+ cls, path: Path, custom_commands: CustomCommands
32
+ ) -> Optional[DetectResult]:
33
+ if (
34
+ _exists(path, "wp-content")
35
+ and _exists(path, "index.php")
36
+ and _exists(path, "wp-load.php")
37
+ ):
32
38
  return DetectResult(cls.name(), 80)
33
39
  return None
34
40
 
@@ -49,11 +55,11 @@ class WordPressProvider(PhpProvider):
49
55
 
50
56
  def declarations(self) -> Optional[str]:
51
57
  return super().declarations() + (
52
- "wp_cli_version = getenv(\"SHIPIT_WPCLI_VERSION\")\n"
58
+ 'wp_cli_version = getenv("SHIPIT_WPCLI_VERSION")\n'
53
59
  "if wp_cli_version:\n"
54
- " wp_cli_download_url = f\"https://github.com/wp-cli/wp-cli/releases/download/v{wp_cli_version}/wp-cli-{wp_cli_version}.phar\"\n"
60
+ ' wp_cli_download_url = f"https://github.com/wp-cli/wp-cli/releases/download/v{wp_cli_version}/wp-cli-{wp_cli_version}.phar"\n'
55
61
  "else:\n"
56
- " wp_cli_download_url = \"https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar\"\n"
62
+ ' wp_cli_download_url = "https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar"\n'
57
63
  )
58
64
 
59
65
  def build_steps(self) -> list[str]:
@@ -62,27 +68,39 @@ class WordPressProvider(PhpProvider):
62
68
  'copy("wordpress/install.sh", "{}/wordpress-install.sh".format(assets["build"]), base="assets")',
63
69
  ]
64
70
  if not _exists(self.path, "wp-config.php"):
65
- steps.append('copy("wordpress/wp-config.php", "{}/wp-config.php".format(app["build"]), base="assets")')
71
+ steps.append(
72
+ 'copy("wordpress/wp-config.php", "{}/wp-config.php".format(app["build"]), base="assets")'
73
+ )
66
74
  return steps + super().build_steps()
67
75
 
68
76
  def prepare_steps(self) -> Optional[list[str]]:
69
77
  return super().prepare_steps()
70
78
 
71
79
  def commands(self) -> Dict[str, str]:
80
+ commands = super().commands()
72
81
  return {
73
- "start": 'f"php -S localhost:{PORT} -t ."',
74
- "wp": '"php {}/wp-cli.phar --allow-root --path={}".format(assets[\"serve\"], app[\"serve\"])',
82
+ "wp": '"php {}/wp-cli.phar --allow-root --path={}".format(assets["serve"], app["serve"])',
75
83
  "after_deploy": '"bash {}/wordpress-install.sh".format(assets["serve"])',
84
+ **commands,
76
85
  }
77
86
 
78
87
  def mounts(self) -> list[MountSpec]:
79
88
  return super().mounts()
80
89
 
81
90
  def volumes(self) -> list[VolumeSpec]:
82
- return [VolumeSpec(name="wp-content", serve_path="\"{}/wp-content/\".format(app[\"serve\"])", var_name="wp_content")]
91
+ return [
92
+ VolumeSpec(
93
+ name="wp-content",
94
+ serve_path='"{}/wp-content/".format(app["serve"])',
95
+ var_name="wp_content",
96
+ )
97
+ ]
83
98
 
84
99
  def env(self) -> Optional[Dict[str, str]]:
85
- return None
86
-
100
+ return {
101
+ "PAGER": '"cat"',
102
+ **(super().env() or {}),
103
+ }
104
+
87
105
  def services(self) -> list[ServiceSpec]:
88
106
  return [ServiceSpec(name="database", provider="mysql")]
shipit/version.py CHANGED
@@ -1,5 +1,5 @@
1
1
  __all__ = ["version", "version_info"]
2
2
 
3
3
 
4
- version = "0.9.1"
5
- version_info = (0, 9, 1, "final", 0)
4
+ version = "0.10.1"
5
+ version_info = (0, 10, 1, "final", 0)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: shipit-cli
3
- Version: 0.9.1
3
+ Version: 0.10.1
4
4
  Summary: Shipit CLI is the best way to build, serve and deploy your projects anywhere.
5
5
  Project-URL: homepage, https://wasmer.io
6
6
  Project-URL: repository, https://github.com/wasmerio/shipit
@@ -0,0 +1,23 @@
1
+ shipit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ shipit/cli.py,sha256=k60mGxpBoyxYgdsFfosc3HuSm5m7Nus5I9RnAaP8X0E,60820
3
+ shipit/generator.py,sha256=W4MynSFwId4PRWWrF0R3NsANye_Zv8TwXCUXai94pW0,6553
4
+ shipit/procfile.py,sha256=GlfdwzFUr0GWGKaaiXlLKNFInWaRNMy_wN14UEyU_5Q,2974
5
+ shipit/version.py,sha256=SEO-RlxHRJwzrNq9nnUQaHiEEN2nAfsVlW1Q9R0SXPU,97
6
+ shipit/assets/php/php.ini,sha256=SaR3wvssSROtxTY_CQ5-BspM_47_I971V5X2dsqe8sU,2579
7
+ shipit/assets/wordpress/install.sh,sha256=h_Pbuj1nUqC0dE91yAYxeBiWf2oFbBWn0oCUkkosUsE,2498
8
+ shipit/assets/wordpress/wp-config.php,sha256=8M4C6xLI5ziX1udM7B-Ef3jd9xuMGVRve6cCuOgDT4o,4786
9
+ shipit/providers/base.py,sha256=-lraLhnXtc2SfYNIUiyry7xD2NL4q0n6voNjr6qfRis,2994
10
+ shipit/providers/gatsby.py,sha256=kzfS-z040GaJ0a9u2_6S6K-ykGSX2yPG17VpjUWBOBA,2393
11
+ shipit/providers/hugo.py,sha256=l3IZ14LGYc3wQ7Uk0iQMDNN9Syd1G4HPzm0ePCGFyzE,1808
12
+ shipit/providers/laravel.py,sha256=2rCuOi2kC5OYQfAG7C0NMhG7KEgzfudwUT_CvVFz4hM,3031
13
+ shipit/providers/mkdocs.py,sha256=mDJpT3rzYAr5Vw-yt5fCpV0QgBZyksn9MrkPd4nzROU,2200
14
+ shipit/providers/node_static.py,sha256=tkttFRB2KEfhZYK_qzcdf7ulEepZEJq9EqkAUo2KYWs,12358
15
+ shipit/providers/php.py,sha256=B5CEvYX51IXWrleNNa6eq-d8xGI8xP4k0Pl8Rpi5cLo,3786
16
+ shipit/providers/python.py,sha256=kQpaaQi8ajHM_SFk2xI5lRIeOc6PXSKumb-Tv_5n6m0,20954
17
+ shipit/providers/registry.py,sha256=JCuQaYTvJcWK1nS-om9TIQgGW6pT5BuNLIRzChLLFWE,731
18
+ shipit/providers/staticfile.py,sha256=hs8ER8rATTho8pBJ6b6ibaOqAfbNZKmlRqbalSdeYY0,2740
19
+ shipit/providers/wordpress.py,sha256=6wd0wPBlE9DvNQgmcEKnH0TArGDkHfRvT9XhqnfOWTU,3258
20
+ shipit_cli-0.10.1.dist-info/METADATA,sha256=7fCKb7M90W9ffVYj-XZEP0ig4Bv2KEJk5FjcvLR4HtE,616
21
+ shipit_cli-0.10.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
+ shipit_cli-0.10.1.dist-info/entry_points.txt,sha256=7AE1NjSrHaSDfbfsRRO50KKnHFTbB0Imsccd1WynzAQ,72
23
+ shipit_cli-0.10.1.dist-info/RECORD,,
@@ -1,23 +0,0 @@
1
- shipit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- shipit/cli.py,sha256=NMZ6xSLq8MlV9yT3FLi9XZ5IBw2IMppoPna_vl9LK1Y,59170
3
- shipit/generator.py,sha256=W4MynSFwId4PRWWrF0R3NsANye_Zv8TwXCUXai94pW0,6553
4
- shipit/procfile.py,sha256=GlfdwzFUr0GWGKaaiXlLKNFInWaRNMy_wN14UEyU_5Q,2974
5
- shipit/version.py,sha256=lVDUJez84exvM3cupsLPLkgwODb6keB_FDCxjb0ObkA,95
6
- shipit/assets/php/php.ini,sha256=f4irndAjB4GuuouEImRkNV22Q-yw1KqR-43jAMDw730,2531
7
- shipit/assets/wordpress/install.sh,sha256=fJkVeGAw_dj-ywmQipAWRjaz57sayD6F0OFvZKMIKug,669
8
- shipit/assets/wordpress/wp-config.php,sha256=IdGQoeg8E89JiqwxO2i8WnGMzmhNWgRz80X6lbU5GXc,4134
9
- shipit/providers/base.py,sha256=-lraLhnXtc2SfYNIUiyry7xD2NL4q0n6voNjr6qfRis,2994
10
- shipit/providers/gatsby.py,sha256=kzfS-z040GaJ0a9u2_6S6K-ykGSX2yPG17VpjUWBOBA,2393
11
- shipit/providers/hugo.py,sha256=l3IZ14LGYc3wQ7Uk0iQMDNN9Syd1G4HPzm0ePCGFyzE,1808
12
- shipit/providers/laravel.py,sha256=2rCuOi2kC5OYQfAG7C0NMhG7KEgzfudwUT_CvVFz4hM,3031
13
- shipit/providers/mkdocs.py,sha256=mDJpT3rzYAr5Vw-yt5fCpV0QgBZyksn9MrkPd4nzROU,2200
14
- shipit/providers/node_static.py,sha256=1eWjhcrKZF8DE9EwlEXwFYrbD2AkeabZjIo1_BocWJk,12335
15
- shipit/providers/php.py,sha256=BSOqS3UhABoe_ued8aXtyn0KdqWbOCq6VV2ehtoBlmk,3547
16
- shipit/providers/python.py,sha256=kQpaaQi8ajHM_SFk2xI5lRIeOc6PXSKumb-Tv_5n6m0,20954
17
- shipit/providers/registry.py,sha256=JCuQaYTvJcWK1nS-om9TIQgGW6pT5BuNLIRzChLLFWE,731
18
- shipit/providers/staticfile.py,sha256=F4thEuihDW-h5DO-lotrjSdHYWzoXofQPpsAgWonvpY,2677
19
- shipit/providers/wordpress.py,sha256=Wjc1fgFburewlf4hQ2ZmxTQko_SHQW-8jrDukzKx0Gs,3019
20
- shipit_cli-0.9.1.dist-info/METADATA,sha256=i8nzdCcT8qJFNNazduiVP1afqfxv1g2rlyCpDfCTcXQ,615
21
- shipit_cli-0.9.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
- shipit_cli-0.9.1.dist-info/entry_points.txt,sha256=7AE1NjSrHaSDfbfsRRO50KKnHFTbB0Imsccd1WynzAQ,72
23
- shipit_cli-0.9.1.dist-info/RECORD,,