[Release] Instructions for updating to/staying on v10/v11

V11 will be release to master branch soon. Here are the instructions you need to follow based on the scenario applicable to you:

Scenario One: You want to upgrade to v11 from v10 (master ==> master)

bench update

Scenario Two: You want to stay on v11 (staging ==> master)

bench switch-to-branch master frappe erpnext --upgrade
bench update --patch

Scenario Three: You want to stay on v10 (master ==> v10.x.x)

bench switch-to-branch v10.x.x frappe erpnext
bench update --patch

OPTIONAL: Remove foundation and frappe_io apps (run only if they exist in your bench’s app directory):

bench remove-app frappe_io
bench remove-app foundation

IMPORTANT: Please clear your browser’s cache too: Ctrl + Shift + R
If after clearing your browser cache you cannot see the chat icon (v11), run bench build and clear cache again.

19 Likes

You can refer to the release notes and a list of contributors here.

tried to do this as follows:

cd frappe-bench
bench update --reset
bench switch-to-branch master frappe
bench switch-to-branch master erpnext
bench update --patch
bench setup requirements
bench --site mysite.local migrate
bench restart

result … frappe has switched to master, but erpnext remains on staging

Are the instructions same for updating my VM instance?
I tried running the command in the terminal but there was some error

@Manan_Shah Can you please post the error log here?

Are you sure --upgrade is a real switch?

/frappe-bench$ bench update --upgrade

Usage: bench update [OPTIONS]
Try "bench update --help" for help.

Error: no such option: --upgrade
$ bench update --help
Usage: bench update [OPTIONS]

  Update bench

Options:
  --pull                Pull changes in all the apps in bench
  --patch               Run migrations for all sites in the bench
  --build               Build JS and CSS artifacts for the bench
  --bench               Update bench
  --requirements        Update requirements
  --restart-supervisor  restart supervisor processes after update
  --restart-systemd     restart systemd units after update
  --auto
  --no-backup
  --force
  --reset               Hard resets git branch's to their new states
                        overriding any changes and overriding rebase on pull
  --help                Show this message and exit.
1 Like

Apologies, I’ve updated the instructions. This used to be a flag.

1 Like

Hi, sorry for late reply.

This worked perfectly on a client instance of mine.

Try this manually:

cd apps/erpnext
git checkout master


I am trying to update from v10 to v11
I tried command bench update

you must run the command from your frappe-bench directory :slight_smile:

Thanks. Worked!:+1:

upon the switch-to-branch master erpnext I just noted that I got a
Branch master does not exist in Upstream for erpnext


throws “error: pathspec ‘master’ did not match any file(s) known to git.” back at me

Hi @vrms,

Go to ERPNext’s folder, open .git/config and make sure it is set up to fetch all branches in upstream:

fetch = +refs/heads/*:refs/remotes/upstream/*

4 Likes

After this run git fetch too.
Then you will be able to run bench switch-to-branch ...

This happens due to shallow cloning.

thanks @chdecultot

my erpnext/.git.config (after replacing the staging with * looks like this now

[core]
       repositoryformatversion = 0
       filemode = true
       bare = false
       logallrefupdates = true
[remote "upstream"]
       url = https://github.com/frappe/erpnext
       fetch = +refs/heads/staging:refs/remotes/upstream/*
[branch "staging"]
       remote = upstream
       merge = refs/heads/staging

even though this is the same as in the config file of frappe it is still not working out

~/frappe-bench$ bench switch-to-branch master erpnext --upgrade
fatal: Invalid refspec '+refs/heads/staging:refs/remotes/upstream/*'
Branch master does not exist in Upstream for erpnext
Switched to master
Please run `bench update --patch` to be safe from any differences in database schema
[core]
       repositoryformatversion = 0
       filemode = true
       bare = false
       logallrefupdates = true
[remote "upstream"]
       url = https://github.com/frappe/erpnext
       fetch = +refs/heads/*:refs/remotes/upstream/*
[branch "staging"]
       remote = upstream
       merge = refs/heads/staging

@vrms this is what you want

and this too:

looks like this is what I have (see above)

~/frappe-bench/apps/erpnext$ git fetch
fatal: Invalid refspec '+refs/heads/staging:refs/remotes/upstream/*'

use the config from here:

3 Likes

This worked for me. Thank you!

1 Like