Open rahul286 opened 1 year ago
@rahul286 Since fm
supports all the frappeverse apps, in the whole frappeverse apps only frappe
,erpnext
,hrms
follows branch name convention like version-14
or version-15-beta
. Other apps like helpdesk
,insights
doesn't follow this naming convention then how should fm
handle this case ?
fm create erp --version 15 --apps erpnext, hrms
We can't implement this as bench get-app <app-name>
works on the basis of branch names. Suppose we are defining the version 15
that will match with many branches and selecting one for installing might become a hard task, I think if user provides branch name will make more sense.
Can we have some kind of aliases?
For apps which support stable and dev releases
stable
version is installed. --dev
flag is passed, dev
version is installed.For apps which support only one, such flag can be ignored by printing warning and install latest.
Let me know if you see any issue. Please confirm before moving ahead.
I can go ahead with this, I will create dictionary with hard corded values of apps with respective branch name and utilize that to get branch names when specific flag --stable
or --dev
will be passed.
For example:
stable = { 'frappe' : 'version-14', 'erpnext': 'version-14' .... }
dev = { 'frappe' : 'develop', 'erpnext' : 'develop' ....}
But I am concerned about branches like `version-15-beta', which is neither develop nor stable.
I have another Idea like creating a stack system which will have good defaults like this
This stacks will be stored in a yaml/toml file. Using this file user can add custom stack that they frequently use if they want.
If user wants to add more apps or want to use other branch for specific stack app then they can use flag --apps <app>:<branch>
, the apps given using flag will have more priority then defined in stack system.
For this system I can expose one flag like --install-stack <stackname>
in the fm create
command.
What do you think about this idea ?
I have another Idea like creating a stack system which will have good defaults like this
- erpstack-15 -> which will have frappe:version-15-beta, erpnext:version-15-beta, hrms:version-15-beta
- erpstack-14 -> which will have frappe:version-14, erpnext:version-14, hrms:version-14
- erpstack-dev -> which will have frappe:develop, erpnext:develop, hrms:develop
This stacks will be stored in a yaml/toml file. Using this file user can add custom stack that they frequently use if they want.
If user wants to add more apps or want to use other branch for specific stack app then they can use flag
--apps <app>:<branch>
, the apps given using flag will have more priority then defined in stack system.For this system I can expose one flag like
--install-stack <stackname>
in thefm create
command.
IMO this is a very good idea! This will let users create and share stacks easily. For example, FrappeHR can have erpnext
, hrms
. Some "frappeverse" playground stack can have essentials like insights
, gameplan
, drive
, etc. already defined.
I can see this becoming really useful!
I think by default hrms, erpnext and other apps better be on same frappe branch version.
So when we use shorthand syntax:
version-15-beta
should be implied for apps, as in the above example.Can we further simplify by making apps comma separated?
A step ahead, we can also simplify version passing
or