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

Add ability to show version (and not download) when parsing version from version.tf file #296

Open
ocofaigh opened this issue Mar 24, 2023 · 0 comments
Assignees
Labels
enhancement Refactor existing code for better performance and quality

Comments

@ocofaigh
Copy link

ocofaigh commented Mar 24, 2023

Is your feature request related to a problem? Please describe.
tfswitch --show-latest will always display the latest version. However it seems there is no way to display the version that would be installed when reading from a version.tf file without actually installing it:

% tfswitch              
Reading required version from terraform file
Reading required version from constraint: >= 1.3, < 1.4
Matched version: 1.3.9

Describe the solution you'd like
Looking for a flag to be able to output 1.3.9 from above example without actually downloading it

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

If you would like to contribute to the code, see step-by-step instructions here:

Required version

go version 1.13

Step 1 - Create workspace

Skip this step if you already have a github go workspace
Create a github workspace.
drawing

Step 2 - Set GOPATH

Skip this step if you already have a github go workspace
Export your GOPATH environment variable in your go directory.

export GOPATH=`pwd`

drawing

Step 3 - Clone repository

Git clone this repository.

git clone [email protected]:warrensbox/terraform-switcher.git

drawing

Step 4 - Get dependencies

Go get all the dependencies.

go mod download
go get -v -t -d ./...

Test the code (optional).

go vet -tests=false ./...
go test -v ./...

drawing

Step 5 - Build executable

Create a new branch.

git checkout -b feature/put-your-branch-name-here

Refactor and add new features to the code.
Go build the code.

go build -o test-tfswitch

Test the code and create a new pull request!

drawing

@ocofaigh ocofaigh added the enhancement Refactor existing code for better performance and quality label Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Refactor existing code for better performance and quality
Projects
None yet
Development

No branches or pull requests

2 participants