Cap-go / CLI

CLI to help you to manage your version in capgo cloud
https://capgo.app
GNU Affero General Public License v3.0
14 stars 35 forks source link

Detect native packages #176

Closed WcaleNieWolny closed 10 months ago

WcaleNieWolny commented 10 months ago

This PR adds the following things:

image

This handles well all edge cases: When there is a dependency in the remote version but not locally (Dependency has been removed): image

When the version has changed locally (update) image

When the version has changed locally (downgrade from remote) image

When a new dependency has been added: image

Next this adds the --auto-min-update-version to the upload command. Here is how it looks: image

(This flag is useful only when the metadata strategy is used for disabling updates)

The important thing is that there was some manifest in supabase, however the CLI deemed the remote version to not be compatible with the remote currently uploaded version.

Since the new version is not compatible a app store update is required. Thus the min version is the 1.0.31.

Now, let's upload a new version. This time we will not change any native dependency image

Well the latest version uploaded to capgo was deemed to be compatible with this new version. Thus an update is possible and the min update version is also 1.0.31

However sometimes you will not have a previous min update version available. (For example because you have just enabled the metadata disallow strategy). In that case you probably want to manually configure it instead of it having it auto generated

image

This change is not breaking. If there is no metadata the CLI will fail nicely image

As for the upload flag. If there is no metadata the update is assumed to be breaking thus we set the min update version to bundle number

image

Schema change: https://github.com/Cap-go/capgo/pull/419 /claim #87

WcaleNieWolny commented 10 months ago

I have wrote tests for this feature. Those are available here

I will not be using the bot to run them as I am still awaiting the supabase base.sql fix pr to be merged and right now the bot would fail to start supabase thus the tests would fail.

However I will proved an output from my local machine here

riderx commented 10 months ago

@WcaleNieWolny can you fix the conflit and run the bot since i merged ?

sonarcloud[bot] commented 10 months ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 1 Security Hotspot
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

riderx commented 10 months ago

@WcaleNieWolny thanks a lot ! If you can add this to the doc it could be nice !