Skip to content

Commit

Permalink
(feat) Install our reference craft version
Browse files Browse the repository at this point in the history
  • Loading branch information
nitriques committed Jan 27, 2025
1 parent c675be4 commit cd7974e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ elif [[ -f "composer.json" ]]; then
exit;
fi;

if [[ ! -f "$CRAFT_INSTALL_VERSION_FILE" ]]; then
echo "$CRAFT_INSTALL_VERSION_FILE file not found, aborting."
exit;
fi;

CRAFT_VERSION=$(jq -r '.require["craftcms/cms"]' < "$CRAFT_INSTALL_VERSION_FILE")
echo "Found Craft version $CRAFT_VERSION as the reference version."

read -r -p 'Continue? [Y/n] ';
if [[ "$REPLY" != "Y" ]]; then
echo "Abort."
Expand All @@ -48,7 +56,7 @@ done;

echo "Install craft"
# Use composer from home dir for the first time
${INSTALLER_PHP_EXEC} -d max_execution_time=-1 ~/composer.phar create-project "craftcms/craft:^5" .
${INSTALLER_PHP_EXEC} -d max_execution_time=-1 ~/composer.phar create-project "craftcms/craft:$CRAFT_VERSION" .

# Fix broken permissions set by craft
chmod 755 web
Expand Down

0 comments on commit cd7974e

Please sign in to comment.