Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add production/development flag to cdash_install #1953

Merged
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
6 changes: 5 additions & 1 deletion docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ php artisan key:check || exit 1

# If the "start-website" argument was provided, start the web server
if [ "$1" = "start-website" ] ; then
bash /cdash/install.sh
if [ "$DEVELOPMENT_BUILD" = "1" ]; then
bash /cdash/install.sh --dev
else
bash /cdash/install.sh
fi

echo "Starting Apache..."

Expand Down
23 changes: 19 additions & 4 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
#!/bin/bash

if [[ "$1" == "--dev" ]]; then
DEVELOPMENT=true
else
DEVELOPMENT=false
fi

echo "=================================================================================";
echo "Beginning CDash installation...";
if $DEVELOPMENT; then
echo "Beginning development CDash installation..."
else
echo "Configuring production CDash installation..."
fi

error_handler() {
echo "
Expand Down Expand Up @@ -29,11 +39,16 @@ echo "Enabling maintenance mode..."
php artisan down --render="maintenance" --refresh=5

echo "Updating vendor dependencies..."
npm install
composer install
if $DEVELOPMENT; then
npm install
composer install
else
npm install --omit=dev
composer install --no-dev --optimize-autoloader
fi

echo "Running migrations..."
php artisan migrate
php artisan migrate --force
php artisan version:set

echo "Clearing caches..."
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
"vue": "^3.3.8",
"vue-loader": "^17.4.2",
"vuedraggable": "^4.1.0",
"webpack": "^5.89.0"
"webpack": "^5.89.0",
"resolve-url-loader": "^5.0.0"
},
"devDependencies": {
"@vue/test-utils": "^2.4.3",
Expand All @@ -62,7 +63,6 @@
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"postcss": "^8.4.32",
"protractor": "^7.0.0",
"resolve-url-loader": "^5.0.0"
"protractor": "^7.0.0"
}
}