-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Magento atualizado de 2.4.2 para 2.4.2-p1 - SystemCode_BrazilCustomerAttributes atualizado pra 1.1.1 corrigindo problema de bairro inválido quando o complemento não é preenchido - Projeto docker (markshust/docker-magento) atualizado para última versão (37.0.2)
- Loading branch information
Showing
18 changed files
with
506 additions
and
486 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
bin/cli /var/www/.composer-global/vendor/bin/cache-clean.js "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
[ -z "$1" ] && echo "Please specify a CLI command (ex. ls)" && exit | ||
bin/clinotty "$@" >/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
[ -z "$1" ] && echo "Please specify test type (ex. integration)" && exit | ||
|
||
TEST_TYPE="$1" | ||
shift | ||
bin/clinotty bash -c "cd dev/tests/${TEST_TYPE} && ../../../vendor/bin/phpunit -c phpunit.xml.dist $*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
if ! bin/clinotty ls /var/www/.composer-global/vendor/bin/cache-clean.js 1> /dev/null 2>&1; then | ||
echo "Installing devtools metapackage, just a moment..." | ||
bin/cliq mkdir -p /var/www/.composer-global | ||
bin/composer init --working-dir=/var/www/.composer-global --quiet --no-interaction | ||
bin/composer require --working-dir=/var/www/.composer-global --quiet markshust/magento2-metapackage-devtools-cli:^1.0 | ||
echo "Devtools installed." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,13 @@ | ||
#!/bin/bash | ||
set -o errexit | ||
[ -z "$1" ] && echo "Please specify the version to download (ex. 2.0.0)" && exit | ||
|
||
edition=${2:-community} | ||
VERSION=${1:-2.4.2} | ||
EDITION=${2:-community} | ||
|
||
if [[ "$edition" == "enterprise" ]]; then | ||
rm -rf src | ||
composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-enterprise-edition="$1" src | ||
exit 0 | ||
fi | ||
bin/stop | ||
docker-compose -f docker-compose.yml up -d | ||
[ $? != 0 ] && echo "Failed to start Docker services" && exit | ||
|
||
if [ ! -f ~/.docker-magento/magento2-"$1".tar.gz ]; then | ||
mkdir -p ~/.docker-magento | ||
(cd ~/.docker-magento && curl -fOL http://pubfiles.nexcess.net/magento/ce-packages/magento2-"$1".tar.gz) | ||
fi | ||
bin/setup-composer-auth | ||
|
||
# Fallback download to hypernode if archive doesn't exist on Nexcess (smaller than 1MB) | ||
if ! tar -tzf ~/.docker-magento/magento2-"$1".tar.gz -O &>/dev/null; then | ||
(cd ~/.docker-magento && curl -o magento2-"$1".tar.gz -fOL https://www.magento.mirror.hypernode.com/releases/magento-"$1".tar.gz) | ||
fi | ||
|
||
# Final fallback. If no archive exists, let's use Composer! | ||
if ! tar -tzf ~/.docker-magento/magento2-"$1".tar.gz -O &>/dev/null; then | ||
echo "Archive not found, or not yet available due to new version release." | ||
echo "Attempting install with Composer..." | ||
rm -rf src | ||
composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs magento/project-community-edition="$1" src | ||
else | ||
echo "Extracting magento2-$1.tar.gz to ./src" | ||
mkdir -p src && tar xzf ~/.docker-magento/magento2-"$1".tar.gz -o -C src | ||
fi | ||
bin/clinotty composer create-project --repository=https://repo.magento.com/ magento/project-"${EDITION}"-edition="${VERSION}" . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
#!/bin/bash | ||
echo "Correcting filesystem ownerships..." | ||
echo "Fixing filesystem ownerships..." | ||
|
||
if [ -z "$1" ]; then | ||
bin/rootnotty chown -R app:app /var/www/ | ||
else | ||
bin/rootnotty chown -R app:app /var/www/html/"$1" | ||
fi | ||
|
||
echo "Filesystem ownerships corrected." | ||
echo "Filesystem ownerships fixed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,28 @@ | ||
#!/bin/bash | ||
MAGENTO_USERNAME_PROP="http-basic.repo.magento.com.username" | ||
MAGENTO_PASSWORD_PROP="http-basic.repo.magento.com.password" | ||
hash composer 2>/dev/null && IS_COMPOSER_ON_HOST=true | ||
|
||
GLOBAL_AUTH=~/.composer/auth.json | ||
PROJECT_AUTH=./src/auth.json | ||
NEED_AUTH=false | ||
|
||
hash composer 2>/dev/null && USE_COMPOSER=true | ||
hash python3 2>/dev/null && USE_PYTHON3=true | ||
|
||
[ ! $USE_COMPOSER ] && [ ! $USE_PYTHON3 ] && echo "Failed to setup composer auth, it needs composer or python3" && exit 1 | ||
|
||
# Get composer auth: username and password | ||
if [ $USE_COMPOSER ]; then | ||
COMPOSER_USER="http-basic.repo.magento.com.username" | ||
COMPOSER_PASS="http-basic.repo.magento.com.password" | ||
|
||
PUBLIC_KEY="$(composer config -g $COMPOSER_USER 2>/dev/null)" | ||
PRIVATE_KEY="$(composer config -g $COMPOSER_PASS 2>/dev/null)" | ||
|
||
if [ -z "$PUBLIC_KEY" ] || [ -z "$PRIVATE_KEY" ]; then | ||
PUBLIC_KEY="$(composer config -d ./src $COMPOSER_USER 2>/dev/null)" | ||
PRIVATE_KEY="$(composer config -d ./src $COMPOSER_PASS 2>/dev/null)" | ||
NEED_AUTH=true | ||
fi | ||
elif [ $USE_PYTHON3 ]; then | ||
PY3_USER="import sys, json; print(json.load(sys.stdin)['http-basic']['repo.magento.com']['username'])" | ||
PY3_PASS="import sys, json; print(json.load(sys.stdin)['http-basic']['repo.magento.com']['password'])" | ||
|
||
if [ -f "$GLOBAL_AUTH" ]; then | ||
PUBLIC_KEY=$(python3 -c "$PY3_USER" 2>/dev/null < "$GLOBAL_AUTH") | ||
PRIVATE_KEY=$(python3 -c "$PY3_PASS" 2>/dev/null < "$GLOBAL_AUTH") | ||
fi | ||
|
||
if [ -z "$PUBLIC_KEY" ] || [ -z "$PRIVATE_KEY" ]; then | ||
if [ -f "$PROJECT_AUTH" ]; then | ||
PUBLIC_KEY=$(python3 -c "$PY3_USER" 2>/dev/null < "$PROJECT_AUTH") | ||
PRIVATE_KEY=$(python3 -c "$PY3_PASS" 2>/dev/null < "$PROJECT_AUTH") | ||
NEED_AUTH=true | ||
fi | ||
fi | ||
if [ $IS_COMPOSER_ON_HOST ]; then | ||
PUBLIC_KEY="$(composer config --global $MAGENTO_USERNAME_PROP 2>/dev/null)" | ||
PRIVATE_KEY="$(composer config --global $MAGENTO_PASSWORD_PROP 2>/dev/null)" | ||
fi | ||
|
||
if [ -n "$PUBLIC_KEY" ] && [ -n "$PRIVATE_KEY" ] && [ $NEED_AUTH = false ]; then | ||
echo "Global composer auth already exists" && exit | ||
fi | ||
|
||
# The last chance to enter manually | ||
if [ -z "$PUBLIC_KEY" ] || [ -z "$PRIVATE_KEY" ]; then | ||
exec < /dev/tty | ||
echo | ||
echo " Authentication required (repo.magento.com, public_key and private_key):" | ||
read -r -p " Username: " PUBLIC_KEY | ||
read -r -p " Password: " PRIVATE_KEY | ||
echo "Composer authentication required (repo.magento.com public and private keys):" | ||
read -r -p " Username: " PUBLIC_KEY | ||
read -r -p " Password: " PRIVATE_KEY | ||
echo | ||
exec <&- | ||
fi | ||
|
||
if [ -z "$PUBLIC_KEY" ] || [ -z "$PRIVATE_KEY" ]; then | ||
echo "Please enter composer auth for repo.magento.com" && exit 1 | ||
echo "Please setup Composer auth for repo.magento.com to continue." && exit 1 | ||
fi | ||
|
||
# For docker-compose.yml setting: ~/.composer:/var/www/.composer:cached | ||
echo "Authentication will add to host composer global config ($GLOBAL_AUTH) for docker container" | ||
if [ $USE_COMPOSER ]; then | ||
composer global config http-basic.repo.magento.com "$PUBLIC_KEY" "$PRIVATE_KEY" | ||
elif [ $USE_PYTHON3 ]; then | ||
PY3_MERGE_AUTH=""" | ||
import sys, json; | ||
data = json.load(sys.stdin) | ||
auth= { | ||
'http-basic': { | ||
'repo.magento.com': { | ||
'username': '${PUBLIC_KEY}', | ||
'password': '${PRIVATE_KEY}' | ||
} | ||
} | ||
} | ||
def merge(src, dest): | ||
for key, val in src.items(): | ||
if isinstance(val, dict): | ||
node = dest.setdefault(key, {}) | ||
merge(val, node) | ||
else: | ||
dest[key] = val | ||
return dest | ||
print(json.dumps(merge(auth, data), indent=4)) | ||
""" | ||
if [ -f "$GLOBAL_AUTH" ]; then | ||
mkdir -p "$(dirname "$GLOBAL_AUTH")" | ||
echo "{}" > "$GLOBAL_AUTH" | ||
fi | ||
mv "$GLOBAL_AUTH" "$GLOBAL_AUTH.bak" | ||
python3 -c "$PY3_MERGE_AUTH" > "$GLOBAL_AUTH" < "$GLOBAL_AUTH.bak" | ||
fi | ||
# Output must be piped otherwise file descriptor errors occur. Carriage returns? | ||
echo "composer config --global http-basic.repo.magento.com ${PUBLIC_KEY} ${PRIVATE_KEY}" | bin/clinotty bash - | ||
|
||
echo "Success to setup composer auth" | ||
echo "Composer auth has been setup." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule BrazilCustomerAttributes
updated
7 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.