add functions to simplify checking upgrade types #3

Merged
decentral1se merged 2 commits from knoflook/tagcmp:main into main 2021-10-02 21:16:06 +00:00
Owner

this will be useful when you want to upgrade an app and need to check what kind of upgrade it will be. The new function just returns a Tag object with Major, Minor and Patch set to the result of subtraction i.e.

tagOne := Parse("3.1.5")
tagTwo := Parse("3.2.0")
diff, err := tagOne.UpgradeElement(tagTwo)

diff is a

Tag {
    Major:		"0",
    Minor:		"1",
    Patch:		"-5",
    MissingMinor:	false,
    MissingMajor:	false,
    MissingPatch:	false,
    UsesV:		false,
}
this will be useful when you want to upgrade an app and need to check what kind of upgrade it will be. The new function just returns a `Tag` object with `Major`, `Minor` and `Patch` set to the result of subtraction i.e. ``` tagOne := Parse("3.1.5") tagTwo := Parse("3.2.0") diff, err := tagOne.UpgradeElement(tagTwo) ``` `diff` is a ``` Tag { Major: "0", Minor: "1", Patch: "-5", MissingMinor: false, MissingMajor: false, MissingPatch: false, UsesV: false, } ```
knoflook added 1 commit 2021-10-01 17:13:57 +00:00
knoflook force-pushed main from 05b56c0aad to 721c863f44 2021-10-01 17:15:51 +00:00 Compare
knoflook force-pushed main from 721c863f44 to aa81b0306c 2021-10-01 18:15:14 +00:00 Compare
knoflook added 1 commit 2021-10-01 18:23:51 +00:00
knoflook changed title from feat: add Tag.UpgradeElement(newTag Tag) which returns a difference between two tags to add functions to simplify checking upgrade types 2021-10-01 18:32:35 +00:00
decentral1se approved these changes 2021-10-02 21:15:54 +00:00
decentral1se left a comment
Owner

Killing it.

Killing it.
decentral1se merged commit 0581b1f5ed into main 2021-10-02 21:16:06 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: coop-cloud/tagcmp#3
No description provided.