tattersoftware / codeigniter4-patches

Automated project updates for CodeIgniter 4
MIT License
29 stars 8 forks source link

New branch created is empty #26

Closed gitchak closed 2 years ago

gitchak commented 2 years ago

Hi Team,

I'm getting the blow error while trying to update from 4.1.9 to 4.2.1. Please help.

$ vendor/bin/patch
git version 2.33.0.windows.2
Composer version 2.0.8 2020-12-03 17:20:38
************************************
*          CONFIGURATION           *
************************************

Scripts Directory: /c/ci4/digi-menu/vendor/tatter/patches/src
Project Directory: /c/ci4/digi-menu
Target Version:
Current Version:
Source Package:    codeigniter4/framework
Base Branch:       master
Selected Items:    app/ public/ env spark

************************************
*             STAGING              *
************************************

Updating files: 100% (7948/7948), done.
Switched to a new branch 'tatter/scratch'
cp: cannot stat 'vendor/codeigniter4/framework/app/': No such file or directory
MGatner commented 2 years ago

(Edited your post for formatting so I can read in mobile)

Can you post the require and require-dev sections of your composer.json?

MGatner commented 2 years ago

Also the output of this command would be helpful (from your clean master branch):

ls -la /c/ci4/digi-menu/vendor/codeigniter4/framework
MGatner commented 2 years ago

Sorry, one more: a copy of your .gitignore file.

gitchak commented 2 years ago
> ls -la /c/ci4/digi-menu/vendor/codeigniter4/framework

$ ls -la /c/ci4/digi-menu/vendor/codeigniter4/framework
total 52
drwxr-xr-x 1 xxxx  1049089    0 Jul 14 14:25 ./
drwxr-xr-x 1 xxxx 1049089    0 Jul 14 14:14 ../
-rw-r--r-- 1 xxxx 1049089 1987 Jul 14 14:25 .gitignore
drwxr-xr-x 1 xxxx 1049089    0 Jul 14 14:25 app/
-rw-r--r-- 1 xxxx 1049089 1392 Jul 14 14:25 composer.json
-rw-r--r-- 1 xxxx 1049089 4639 Jul 14 14:25 env
-rw-r--r-- 1 xxxx 1049089 1181 Jul 14 14:25 LICENSE
-rw-r--r-- 1 xxxx 1049089 2118 Jul 14 14:25 phpunit.xml.dist
drwxr-xr-x 1 xxxx 1049089    0 Jul 14 14:25 public/
-rw-r--r-- 1 xxxx 1049089 2568 Jul 14 14:25 README.md
-rwxr-xr-x 1 xxxx 1049089 2264 Jul 14 14:25 spark*
drwxr-xr-x 1 xxxx 1049089    0 Jul 14 14:25 system/
drwxr-xr-x 1 xxxx 1049089    0 Jul 14 14:25 tests/
drwxr-xr-x 1 xxxx 1049089    0 Jul 14 14:25 writable/
gitchak commented 2 years ago

(Edited your post for formatting so I can read in mobile)

Can you post the require and require-dev sections of your composer.json?

"require": { "php": "^7.3||^8.0", "codeigniter4/framework": "^4.0", "aws/aws-sdk-php": "^3.184", "endroid/qr-code": "^4.3" }, "require-dev": { "fakerphp/faker": "^1.9", "mikey179/vfsstream": "^1.6", "phpunit/phpunit": "^9.1", "tatter/patches": "^2.0" },

gitchak commented 2 years ago

Sorry, one more: a copy of your .gitignore file.

-------------------------

Operating Specific Junk Files

-------------------------

OS X

.DS_Store .AppleDouble .LSOverride

OS X Thumbnails

._*

Windows image file caches

Thumbs.db ehthumbs.db Desktop.ini

Recycle Bin used on file shares

$RECYCLE.BIN/

Windows Installer files

.cab .msi .msm .msp

Windows shortcuts

*.lnk

Linux

*~

KDE directory preferences

.directory

Linux trash folder which might appear on any partition or disk

.Trash-*

-------------------------

Environment Files

-------------------------

These should never be under version control,

as it poses a security risk.

.env .vagrant Vagrantfile

-------------------------

Temporary Files

-------------------------

writable/cache/*

!writable/cache/index.html

writable/logs/*

!writable/logs/index.html

writable/session/*

!writable/session/index.html

writable/uploads/*

!writable/uploads/index.html

writable/debugbar/*

php_errors.log

-------------------------

User Guide Temp Files

-------------------------

user_guide_src/build/ user_guide_src/cilexer/build/ user_guide_src/cilexer/dist/ user_guide_src/cilexer/pycilexer.egg-info/

-------------------------

Test Files

-------------------------

tests/coverage*

Don't save phpunit under version control.

phpunit

-------------------------

Composer

-------------------------

vendor/

writable/ app/Config/App.php app/Config/Database.php

-------------------------

IDE / Development Files

-------------------------

Modules Testing

_modules/*

phpenv local config

.php-version

Jetbrains editors (PHPStorm, etc)

.idea/ *.iml

Netbeans

nbproject/ build/ nbbuild/ dist/ nbdist/ nbactions.xml nb-configuration.xml .nb-gradle/

Sublime Text

.tmlanguage.cache .tmPreferences.cache .stTheme.cache .sublime-workspace *.sublime-project .phpintel /api/

Visual Studio Code

.vscode/

/results/ /phpunit.xml /.phpunit..cache

kenjis commented 2 years ago

@gitchak

You are doing vendoring.

.gitignore:

#vendor/

Patch does not work with vendoring.

$ vendor/bin/patch
git version 2.35.3
Composer version 2.3.9 2022-07-05 16:52:11
************************************
*          CONFIGURATION           *
************************************

Scripts Directory: /Users/kenji/tmp/ci4app/vendor/tatter/patches/src
Project Directory: /Users/kenji/tmp/ci4app
Target Version:    
Current Version:   
Source Package:    codeigniter4/framework
Base Branch:       main
Selected Items:    app/ public/ env spark

************************************
*             STAGING              *
************************************

Switched to a new branch 'tatter/scratch'
Removing vendor/codeigniter4/
cp: vendor/codeigniter4/framework/app/: No such file or directory
gitchak commented 2 years ago

Thank you so much Kenjis. I had to update the gitignore and it worked. Think it's a good idea to add a caveat of vendoring while using this script

MGatner commented 2 years ago

I am traveling for the next week but would be happy to receive a Pull Request to add such a note.

gitchak commented 2 years ago

All done, thank you MGatner