Skip to content

fix: tns update command should work with npm tags #5213

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

Merged
merged 2 commits into from
Jan 13, 2020

Conversation

rosen-vladimirov
Copy link
Contributor

In the past tns update command worked with tags, but since 6.0 this was broken. The logic in Update Controller requires a valid package.json from template with same version. However, our templates do not have next, rc, etc. versions and passing tag to the command fails.
In order to fix this, construct the required template manually. For each of the packages we would update, check if the has a valid version with the same tag and get the current version behind this tag.

PR Checklist

What is the current behavior?

tns update next fails.

What is the new behavior?

tns update next passes.

Fixes issue #5072

In the past `tns update` command worked with tags, but since 6.0 this was broken. The logic in Update Controller requires a valid package.json from template with same version. However, our templates do not have `next`, `rc`, etc. versions and passing tag to the command fails.
In order to fix this, construct the required template manually. For each of the packages we would update, check if the has a valid version with the same tag and get the current version behind this tag.
@cla-bot cla-bot bot added the cla: yes label Jan 13, 2020
@rosen-vladimirov
Copy link
Contributor Author

test cli-smoke

@rosen-vladimirov rosen-vladimirov added this to the 6.3.4 milestone Jan 13, 2020
@rosen-vladimirov
Copy link
Contributor Author

test cli-smoke

@rosen-vladimirov rosen-vladimirov modified the milestones: 6.3.4, 6.3.3 Jan 13, 2020
@rosen-vladimirov rosen-vladimirov merged commit 423cc4c into release Jan 13, 2020
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-update-command branch January 13, 2020 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants