Skip to content

Commit

Permalink
Fix detecting 6.x for composer and fix removing files
Browse files Browse the repository at this point in the history
The folder public/ was gitignored and alway existed..
  • Loading branch information
williamdes committed Jan 18, 2025
1 parent c7a71e5 commit 8d4a841
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions website/daily-composer
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ generate_mo() {
generate_css() {
# You can not use --production because it creates the error "[BABEL]: Cannot find module 'browserslist'"
yarn install --frozen-lockfile --non-interactive --silent
if [ -d ./public/ ]; then
if [ -f ./bin/console ]; then
git add --force public/themes/*/css/*.css || echo "No css file found, not adding to git repository"
git add --force public/themes/*/css/*.css.map || echo "No css.map files found, not adding to git repository"
else
Expand All @@ -67,7 +67,7 @@ generate_css() {
generate_js() {
# You can not use --production because it creates the error "[BABEL]: Cannot find module 'browserslist'"
yarn install --frozen-lockfile --non-interactive --silent
if [ -d ./public/ ]; then
if [ -f ./bin/console ]; then
git add --force public/js/dist/ || echo "No JS files found, not adding to git repository"
else
git add --force js/dist/ || echo "No JS files found, not adding to git repository"
Expand Down Expand Up @@ -103,7 +103,16 @@ set_version_in_composer() {

reset_not_allowed_to_change_source_files() {
# Source: https://stackoverflow.com/a/68019875/5155484
if [ -d ./public/ ]; then

if [ -f yarn-error.log ]; then
rm -v yarn-error.log
fi

# Source: https://stackoverflow.com/a/2196755/5155484
echo "Cleaning ignored files"
git clean -fdX

if [ -f ./bin/console ]; then
CHANGED_FILES="$(git diff phpmyadmin/$branch..$newbranch --name-only -- './*' ':!README.rst' ':!public/js/dist/*.js' ':!public/js/dist/*.js.map' ':!resources/locale/*.mo' ':!public/themes/*.css' ':!public/themes/*.css.map')"
else
CHANGED_FILES="$(git diff phpmyadmin/$branch..$newbranch --name-only -- './*' ':!README.rst' ':!js/dist/*.js' ':!js/dist/*.js.map' ':!locale/*.mo' ':!themes/*.css' ':!themes/*.css.map')"
Expand Down

0 comments on commit 8d4a841

Please sign in to comment.