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

Extract env setup to a script #305

Merged
merged 9 commits into from
Dec 5, 2018
Merged

Extract env setup to a script #305

merged 9 commits into from
Dec 5, 2018

Conversation

noamnelke
Copy link
Member

Also, support different operating systems and architectures when installing protobuf.

#!/bin/bash
./ci/install-protobuf.sh

go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
Copy link
Contributor

Choose a reason for hiding this comment

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

you are accessing github.com a lot, i'd put it in a pramaeter $GITHUB

Copy link
Member Author

Choose a reason for hiding this comment

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

I think the readability and code complexity tradeoff isn't worth the DRY-ness

# Make sure you grab the latest version
curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip
echo "fetching ${protoc_url}"
curl -L -o "protoc.zip" ${protoc_url}
Copy link
Contributor

Choose a reason for hiding this comment

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

what if this fails? maybe put in && or $? && cmd

Copy link
Member Author

Choose a reason for hiding this comment

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

solved in 597e6a8

Also, support different operating systems and architectures when installing protobuf.
sudo mv protoc3/bin/* /usr/local/bin/

# Move protoc3/include to /usr/local/include/
sudo mv protoc3/include/* /usr/local/include/
echo "syncing include to /usr/local/include"
sudo rsync -a protoc3/include/ /usr/local/include/
Copy link
Contributor

Choose a reason for hiding this comment

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

remove sudo

@noamnelke noamnelke force-pushed the extract_env_setup branch 2 times, most recently from 1c02f0c to 51407bf Compare December 4, 2018 16:55
@antonlerner antonlerner merged commit 90e5a88 into develop Dec 5, 2018
@noamnelke noamnelke deleted the extract_env_setup branch December 5, 2018 15:16
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.

None yet

2 participants