Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'viur build release' only updates to latest Version #188

Open
Grashalmbeisser opened this issue Oct 25, 2024 · 4 comments · May be fixed by #191
Open

'viur build release' only updates to latest Version #188

Grashalmbeisser opened this issue Oct 25, 2024 · 4 comments · May be fixed by #191
Labels
bug Something isn't working Priority: Critical This should be dealt with ASAP. It's blocking someone.

Comments

@Grashalmbeisser
Copy link
Collaborator

No description provided.

@phorward
Copy link
Member

Yes, here comes further information!

I want to stick to a specific version in project.json, and define this:

{
    "cli-version": "2.0.3",
    "default": {
        "builds": {
            "admin": {
                "command": "viur package install admin default 4.5.12",
                "kind": "exec",
                "version": "4.5.12"
            }
        }
    }
}

Then I run viur build release and the project.json looks like this:

{
    "cli-version": "2.0.3",
    "default": {
        "builds": {
            "admin": {
                "command": "viur package install admin",
                "kind": "exec",
                "version": "4.5.12"
            }
        }
    }
}

It is IMPORTANT that viur-cli uses the version specified as "version", and only updates when something like viur package update is being executed!!!

@phorward phorward added bug Something isn't working Priority: Critical This should be dealt with ASAP. It's blocking someone. labels Nov 11, 2024
@phorward
Copy link
Member

What about chaning the old format structure

{
    "cli-version": "2.0.3",
    "default": {
        "application_name": "my-project",
        "builds": {
            "admin": {
                "command": "viur package install admin default 4.5.12",
                "kind": "exec",
                "version": "4.5.12"
            },
            "dashboard": {
                "clean": "rm -rf deploy/static/dashboard && rm -rf sources/app/node_modules",
                "command": "build",
                "kind": "npm",
                "source": "app"
            },
            "scriptor": {
                "command": "viur package install scriptor default 2.1.2",
                "kind": "exec",
                "version": "2.1.2"
            }
        },
        "distribution_folder": "./deploy",
        "sources_folder": "./sources",
        "version": "$(year)-$(month)-$(day)-$(user)"
    },
    "format": "2.0.0"
}

generally to a new format structure

{
    "cli-version": "2.0.3",
    "default": {
        "application_name": "my-project",
        "builds": {
            "dashboard": {
                "clean": "rm -rf deploy/static/dashboard && rm -rf sources/app/node_modules",
                "command": "build",
                "kind": "npm",
                "source": "app"
            },
        },
        "packages": {
            "admin": "4.5.12",
            "scriptor": "2.1.2"
        },
        "distribution_folder": "./deploy",
        "sources_folder": "./sources",
        "version": "$(year)-$(month)-$(day)-$(user)"
    },
    "format": "2.0.0"
}

@Grashalmbeisser
Copy link
Collaborator Author

Before starting the Task of changing the format, i would like to fix the bug for the Version 2.1.0 deployment. Afterwards it is a generally good idea to rethink the way the ViUR Community wants to use the project json (As a document to customize their workflow by editing it or just as a collection of information about the project itself that should not be edited)

@phorward
Copy link
Member

Regarding this issue, I think that the solution of my last comment in #191 will be the best and simplest:

@Grashalmbeisser the easiest solution would be to remove the "version"-key from the exec-definition, and just maintain the "command". Either it is "viur package install admin" to have the latest version, or "viur package install admin 4.6.6" to stick to a specific version. Then you can just remove this current decision making process etc. and JUST rely on this little information as the single source of truth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority: Critical This should be dealt with ASAP. It's blocking someone.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants