shipit-cli 0.10.0__tar.gz → 0.10.1__tar.gz
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_cli-0.10.0 → shipit_cli-0.10.1}/PKG-INFO +1 -1
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/pyproject.toml +1 -1
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/assets/php/php.ini +2 -0
- shipit_cli-0.10.1/src/shipit/assets/wordpress/install.sh +84 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/assets/wordpress/wp-config.php +21 -10
- shipit_cli-0.10.1/src/shipit/version.py +5 -0
- shipit_cli-0.10.0/src/shipit/assets/wordpress/install.sh +0 -25
- shipit_cli-0.10.0/src/shipit/version.py +0 -5
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/.gitignore +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/README.md +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/__init__.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/cli.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/generator.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/procfile.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/base.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/gatsby.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/hugo.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/laravel.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/mkdocs.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/node_static.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/php.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/python.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/registry.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/staticfile.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/src/shipit/providers/wordpress.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/tests/test_e2e.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/tests/test_generate_shipit_examples.py +0 -0
- {shipit_cli-0.10.0 → shipit_cli-0.10.1}/tests/test_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: shipit-cli
|
|
3
|
-
Version: 0.10.
|
|
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
|
|
@@ -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
|
|
@@ -0,0 +1,84 @@
|
|
|
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..."
|
|
8
|
+
|
|
9
|
+
echo "Creating required directories..."
|
|
10
|
+
|
|
11
|
+
mkdir -p wp-content/plugins
|
|
12
|
+
mkdir -p wp-content/upgrade
|
|
13
|
+
|
|
14
|
+
echo "Installing WordPress core"
|
|
15
|
+
|
|
16
|
+
wp core install \
|
|
17
|
+
--url="$WP_SITEURL" \
|
|
18
|
+
--title="$WP_SITE_TITLE" \
|
|
19
|
+
--admin_user="$WP_ADMIN_USERNAME" \
|
|
20
|
+
--admin_password="$WP_ADMIN_PASSWORD" \
|
|
21
|
+
--admin_email="$WP_ADMIN_EMAIL" \
|
|
22
|
+
--locale="$WP_LOCALE"
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
if [ "${WP_UPDATE_DB:-false}" = "true" ]; then
|
|
26
|
+
echo "Updating database..."
|
|
27
|
+
wp core update-db
|
|
28
|
+
fi
|
|
29
|
+
|
|
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,7 +21,6 @@ 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])) {
|
|
@@ -29,14 +28,17 @@ function get_env_var(string $name, string $default = ''): string
|
|
|
29
28
|
}
|
|
30
29
|
|
|
31
30
|
if ($default === '') {
|
|
32
|
-
$
|
|
33
|
-
fwrite($stderr, "Configuration error: environment variable " . $name . " not provided. Using default value: " . $default . PHP_EOL);
|
|
34
|
-
fclose($stderr);
|
|
31
|
+
error_log("Configuration error: environment variable " . $name . " not provided.");
|
|
35
32
|
}
|
|
36
33
|
|
|
37
34
|
return $default;
|
|
38
35
|
}
|
|
39
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
|
+
|
|
40
42
|
// ** Database settings - You can get this info from your web host ** //
|
|
41
43
|
/** The name of the database for WordPress */
|
|
42
44
|
define( 'DB_NAME', get_env_var('DB_NAME', 'wordpress') );
|
|
@@ -87,14 +89,14 @@ define('NONCE_SALT', get_env_var('NONCE_SALT', 'no secret provided'));
|
|
|
87
89
|
$scheme = isset( $_SERVER['HTTPS'] ) && '1' === (string) $_SERVER['HTTPS'] ? "https://" : "http://";
|
|
88
90
|
|
|
89
91
|
if (!defined('WP_HOME')) {
|
|
90
|
-
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"));
|
|
91
93
|
}
|
|
92
94
|
|
|
93
|
-
define( 'WP_SITEURL', WP_HOME . '/' );
|
|
95
|
+
define( 'WP_SITEURL', get_env_var('WP_SITEURL', WP_HOME . '/') );
|
|
94
96
|
|
|
95
|
-
define( 'WP_MEMORY_LIMIT', '256M' );
|
|
96
|
-
define( 'WP_MAX_MEMORY_LIMIT', '256M' );
|
|
97
|
-
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));
|
|
98
100
|
|
|
99
101
|
/**#@-*/
|
|
100
102
|
|
|
@@ -118,11 +120,20 @@ $table_prefix = 'wp_';
|
|
|
118
120
|
*
|
|
119
121
|
* @link https://wordpress.org/support/article/debugging-in-wordpress/
|
|
120
122
|
*/
|
|
121
|
-
define( 'WP_DEBUG', false );
|
|
123
|
+
define( 'WP_DEBUG', get_env_var_bool('WP_DEBUG', false) );
|
|
122
124
|
|
|
123
125
|
/* Add any custom values between this line and the "stop editing" line. */
|
|
124
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');
|
|
125
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
|
+
}
|
|
126
137
|
|
|
127
138
|
/* That's all, stop editing! Happy publishing. */
|
|
128
139
|
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Needed to get the WP-CLI commands to avoid asking for the TTY size
|
|
2
|
-
export COLUMNS=80
|
|
3
|
-
|
|
4
|
-
echo "Creating required directories..."
|
|
5
|
-
|
|
6
|
-
mkdir -p wp-content/plugins
|
|
7
|
-
mkdir -p wp-content/upgrade
|
|
8
|
-
|
|
9
|
-
echo "Installing WordPress core..."
|
|
10
|
-
|
|
11
|
-
wp core install \
|
|
12
|
-
--url="$WP_SITE_URL" \
|
|
13
|
-
--title="$WP_SITE_TITLE" \
|
|
14
|
-
--admin_user="$WP_ADMIN_USERNAME" \
|
|
15
|
-
--admin_password="$WP_ADMIN_PASSWORD" \
|
|
16
|
-
--admin_email="$WP_ADMIN_EMAIL" \
|
|
17
|
-
--locale="$WP_LOCALE"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if [ -z "$WP_UPDATE_DB" ]; then
|
|
21
|
-
echo "Updating database..."
|
|
22
|
-
wp core update-db
|
|
23
|
-
fi
|
|
24
|
-
|
|
25
|
-
echo "Installation complete"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|