Skip to content

Upgrade command#196

Merged
kytrinyx merged 3 commits intoexercism:masterfrom
Tonkpils:upgrade
Jun 23, 2015
Merged

Upgrade command#196
kytrinyx merged 3 commits intoexercism:masterfrom
Tonkpils:upgrade

Conversation

@Tonkpils
Copy link
Contributor

This is a working prototype of the upgrade command for the CLI.

It will install the latest version of the CLI under the same path as the executable that called the command.

One thing that it does not support yet that I'd like to fix before this gets merged:

  1. ARM version upgrades
    Golang has no way of checking the ARM version during runtime
    • A possible solution would be to set the ARM version during the build process with -ldflags which would allow us to set the binary's OS/ARCH/ARMV that was used during build.

Also, I wrote the windows portion a bit blindly since I don't have a windows machine to test it on. I'll make sure it works properly when I get a chance.

I'd also like to include a generic message to file an issue here if the install fails with the debug info but not too sure how the message should read. Thoughts?

Once this is merged it fixes #61

@kytrinyx
Copy link
Member

This is so cool! I'm at work, so can't read through it now. I think setting the arm version with a build flag is perfect.

@Tonkpils
Copy link
Contributor Author

Ok, I re-wrote the bin/build-all script to make it set the variables during build. I've tested the upgrade command in linux, windows and mac. Also, if you see any improvements that can be done to the build script let me know.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay, doc comments :)

@kytrinyx
Copy link
Member

This looks great. I'm going to merge it in (the only thing that I was wondering about is a comment, and that can be tweaked later, I think).

kytrinyx added a commit that referenced this pull request Jun 23, 2015
@kytrinyx kytrinyx merged commit 6587eb0 into exercism:master Jun 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add exercism upgrade or exercism update

2 participants