Closed Grashalmbeisser closed 5 months ago
Hello @Grashalmbeisser, project.json
is already part of viur-base since a while.
For better understanding, here's an annotated version of the current project.json
in viur-base, and also an annotation what would be nice to viur-cli.
{
// On this level are profiles.
// "default" is a profile, which is inherited by "develop" and "live" and can be customized for particular versions and/or GAE projects. Therefore, every profile can contain all keys from the "default" profile.
"default": {
"admin": "4.0.8", // this is the admin-version *1
"builds": { // Here are steps for building for the `viur build` command
"admin": {
"command": "viur install admin 4.0.8",
"kind": "exec"
},
"npm": {
"command": "build",
"kind": "npm",
"source": ""
}
},
"core": "3.5.1", // this is the core-version *1
"distribution_folder": "./deploy", // The deploy folder, which is uploaded to GAE
"format": "1.1.1", // The file format of the project.json *2
"pyodide": "0.19.1", // THe pyodide version *1
"sources_folder": "./sources", // deprecated! The source folder for apps; This should be mainted by "builds" individually for every app, and removed from here
"vi": "not-in-use", // deprecated! *2
},
"develop": { // "develop" is currently sometimes hard-coded in viur-cli *3
"application_name": "my-dev-app-viur3", // The name of the GAE project *4
"version": "dev-$(user)" // The version string; Variables can be used here.
},
"live": {
"application_name": "my-live-app-viur3",
"version": "live-$(year)-$(month)-$(day)-$(hour)-$(minute)-$(second)"
}
}
Please see my annotations:
core
, admin
, vi
and pyodide
only indicates the version that was installed by the user. But it should define the version to be installed for the project, and should also be maintained by viur-cli
:
core
will set the pipenv's viur-core
-version to the provided version, optimally via e.g. viur install core 3.5.1
admin
should install the specified admin version using e.g. viur install admin 4.0.8
vi
should install the specified vi version using e.g. viur install vi 3.0.38
pyodide
should install the specified pyodide version using e.g. viur install pyodide 0.24.0
viur install
should install all specified modules in a specific versionviur install --update
should update all installed modules to a specific versionformat
setting should not be part of the default
-profil. It should be on top.default
-profileThis is what an optimal project.json
should look like, which only installs core
and admin
. Because no pyodide
and no vi
is providet, it is ignored. core
setting should be mandatory!
{
"format": "2.0.0",
"default": {
"admin": "4.0.8",
"core": "3.5.1",
"distribution_folder": "./deploy",
"application_name": "my-live-app-viur3",
"version": "live-$(year)-$(month)-$(day)-$(hour)-$(minute)-$(second)"
},
"develop": {
"application_name": "my-dev-app-viur3",
},
}
I hope this clarifies things a bit. Feed free to move it into an issue in viur-cli
as well.
I no longer see any need for action regarding this ticket.
project.json
in viur-base
viur-cli
If I am wrong, please just open the ticket again.
While developing the ViUR CLI i noticed, that we are creating a project.json to via the Cli to the project root directory. I think the project.json is better suited in the viur base project. Where the developer is not dependent on the viur cli.