Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Post git reset --hard and Bitbucket pipeline rebuild theme.json not removed

imwz January 18, 2023

We had to revert to a pre merger state and it was done using `it reset --hard <commit_previous_to_merge>` . But for some reason this hard reset did not remove `wp-content/themes/theme.json` We had to remove this using SFTP on our WP Engine server. Does anyone know how a hard reset and Bitbucket build could either recreate the `theme.json` just removed or a hard reset not removing this file?

current build is

 

image: misterio92/ci-php-node

pipelines:

branches:

develop:

- step:

name: Deploy Development

deployment: test

caches:

- node

- composer

script:

- echo "{\"http-basic\":{\"composer.deliciousbrains.com\":{\"username\":\"$DELICIOUS_BRAINS_USERNAME\",\"password\":\"$DELICIOUS_BRAINS_PASSWORD\"}}}" > auth.json

- composer install

- git add wp-content/plugins -f

- cd "wp-content/themes/theme"

- npm install

- npm run build

- cd "/opt/atlassian/pipelines/agent/build"

- mv .gitignore .gitignore-old

- mv .gitignore-build .gitignore

- git status

- git add .

- git commit -m "deployment"

- git remote -v

- git fetch --unshallow origin

- git push -f $GIT_REPO develop

- echo "Develop check"

staging:

- step:

name: Deploy Staging

deployment: staging

caches:

- node

- composer

script:

- echo "{\"http-basic\":{\"composer.deliciousbrains.com\":{\"username\":\"$DELICIOUS_BRAINS_USERNAME\",\"password\":\"$DELICIOUS_BRAINS_PASSWORD\"}}}" > auth.json

- composer install

- git add wp-content/plugins -f

- cd "wp-content/themes/theme"

- npm install

- npm run build

- cd "/opt/atlassian/pipelines/agent/build"

- mv .gitignore .gitignore-old

- mv .gitignore-build .gitignore

- git status

- git add .

- git commit -m "deployment"

- git remote -v

- git fetch --unshallow origin

- git push -f $GIT_REPO staging

- echo "Staging check"

master:

- step:

name: Deploy Production

deployment: production

caches:

- node

- composer

script:

- echo "{\"http-basic\":{\"composer.deliciousbrains.com\":{\"username\":\"$DELICIOUS_BRAINS_USERNAME\",\"password\":\"$DELICIOUS_BRAINS_PASSWORD\"}}}" > auth.json

- composer install

- git add wp-content/plugins/* -f

- cd "wp-content/themes/theme"

- npm install

- npm run build

- cd "/opt/atlassian/pipelines/agent/build"

- mv .gitignore .gitignore-old

- mv .gitignore-build .gitignore

- git status

- git add .

- git commit -m "deployment"

- git remote -v

- git fetch --unshallow origin

- git push -f $GIT_REPO master

- echo "Production check"

shop:

- step:

name: Deploy Shop Server

deployment: shop

caches:

- node

- composer

script:

- echo "{\"http-basic\":{\"composer.deliciousbrains.com\":{\"username\":\"$DELICIOUS_BRAINS_USERNAME\",\"password\":\"$DELICIOUS_BRAINS_PASSWORD\"}}}" > auth.json

- composer install

- git add wp-content/plugins -f

- cd "wp-content/themes/theme"

- npm install

- npm run build

- cd "/opt/atlassian/pipelines/agent/build"

- mv .gitignore .gitignore-old

- mv .gitignore-build .gitignore

- git status

- git add .

- git commit -m "deployment"

- git remote -v

- git fetch --unshallow origin

- git push -f $GIT_REPO shop

- echo "Shop check"

I think a hard reset should reset to previous state so `theme.json` should have been removed.. But would the theme rebuild theme.json based on database data then? Or is there something else I am missing?

0 answers

Suggest an answer

Log in or Sign up to answer