-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Introduce Gemfile, ruby-version #32303
Closed
Closed
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0f27961
Provide template/Gemfile with recommended Ruby and CocoaPods
barbieri 553fe9c
Simplify scripts/update_podfile_lock.sh
barbieri e1d9cfa
NativeAnimatedHelper: Improve warning to use "bundle exec"
barbieri 202c69a
CircleCI uses our Gemfile
barbieri f047e06
Update all CocoaPods use to use "bundle exec"
barbieri bc0856b
Update Ruby version from bump-oss-version.js
barbieri 1e2f819
Shellcheck scripts/process-podspecs.sh
barbieri File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
BUNDLE_PATH: "vendor/bundle" | ||
BUNDLE_FORCE_RUBY_PLATFORM: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.7.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
source 'https://rubygems.org' | ||
|
||
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version | ||
ruby '2.7.4' | ||
|
||
gem 'cocoapods', '~> 1.11', '>= 1.11.2' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
CFPropertyList (3.0.4) | ||
rexml | ||
activesupport (6.1.4.1) | ||
concurrent-ruby (~> 1.0, >= 1.0.2) | ||
i18n (>= 1.6, < 2) | ||
minitest (>= 5.1) | ||
tzinfo (~> 2.0) | ||
zeitwerk (~> 2.3) | ||
addressable (2.8.0) | ||
public_suffix (>= 2.0.2, < 5.0) | ||
algoliasearch (1.27.5) | ||
httpclient (~> 2.8, >= 2.8.3) | ||
json (>= 1.5.1) | ||
atomos (0.1.3) | ||
claide (1.0.3) | ||
cocoapods (1.11.2) | ||
addressable (~> 2.8) | ||
claide (>= 1.0.2, < 2.0) | ||
cocoapods-core (= 1.11.2) | ||
cocoapods-deintegrate (>= 1.0.3, < 2.0) | ||
cocoapods-downloader (>= 1.4.0, < 2.0) | ||
cocoapods-plugins (>= 1.0.0, < 2.0) | ||
cocoapods-search (>= 1.0.0, < 2.0) | ||
cocoapods-trunk (>= 1.4.0, < 2.0) | ||
cocoapods-try (>= 1.1.0, < 2.0) | ||
colored2 (~> 3.1) | ||
escape (~> 0.0.4) | ||
fourflusher (>= 2.3.0, < 3.0) | ||
gh_inspector (~> 1.0) | ||
molinillo (~> 0.8.0) | ||
nap (~> 1.0) | ||
ruby-macho (>= 1.0, < 3.0) | ||
xcodeproj (>= 1.21.0, < 2.0) | ||
cocoapods-core (1.11.2) | ||
activesupport (>= 5.0, < 7) | ||
addressable (~> 2.8) | ||
algoliasearch (~> 1.0) | ||
concurrent-ruby (~> 1.1) | ||
fuzzy_match (~> 2.0.4) | ||
nap (~> 1.0) | ||
netrc (~> 0.11) | ||
public_suffix (~> 4.0) | ||
typhoeus (~> 1.0) | ||
cocoapods-deintegrate (1.0.5) | ||
cocoapods-downloader (1.5.1) | ||
cocoapods-plugins (1.0.0) | ||
nap | ||
cocoapods-search (1.0.1) | ||
cocoapods-trunk (1.6.0) | ||
nap (>= 0.8, < 2.0) | ||
netrc (~> 0.11) | ||
cocoapods-try (1.2.0) | ||
colored2 (3.1.2) | ||
concurrent-ruby (1.1.9) | ||
escape (0.0.4) | ||
ethon (0.14.0) | ||
ffi (>= 1.15.0) | ||
ffi (1.15.4) | ||
fourflusher (2.3.1) | ||
fuzzy_match (2.0.4) | ||
gh_inspector (1.1.3) | ||
httpclient (2.8.3) | ||
i18n (1.8.10) | ||
concurrent-ruby (~> 1.0) | ||
json (2.5.1) | ||
minitest (5.14.4) | ||
molinillo (0.8.0) | ||
nanaimo (0.3.0) | ||
nap (1.1.0) | ||
netrc (0.11.0) | ||
public_suffix (4.0.6) | ||
rexml (3.2.5) | ||
ruby-macho (2.5.1) | ||
typhoeus (1.4.0) | ||
ethon (>= 0.9.0) | ||
tzinfo (2.0.4) | ||
concurrent-ruby (~> 1.0) | ||
xcodeproj (1.21.0) | ||
CFPropertyList (>= 2.3.3, < 4.0) | ||
atomos (~> 0.1.3) | ||
claide (>= 1.0.2, < 2.0) | ||
colored2 (~> 3.1) | ||
nanaimo (~> 0.3.0) | ||
rexml (~> 3.2.4) | ||
zeitwerk (2.4.2) | ||
|
||
PLATFORMS | ||
ruby | ||
|
||
DEPENDENCIES | ||
cocoapods (~> 1.11, >= 1.11.2) | ||
|
||
RUBY VERSION | ||
ruby 2.7.4p191 | ||
|
||
BUNDLED WITH | ||
2.2.28 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
# Copyright (c) Facebook, Inc. and its affiliates. | ||
# | ||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
|
||
set -e | ||
|
||
if [ "$VERBOSE" = 1 ]; then | ||
set -x | ||
fi | ||
|
||
case $(sed --help 2>&1) in | ||
*GNU*) sed_i () { sed -i "$@"; };; | ||
*) sed_i () { sed -i '' "$@"; };; | ||
esac | ||
|
||
SCRIPTS="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
ROOT="$(dirname "$SCRIPTS")" | ||
|
||
die() { | ||
echo "ERROR: $*" >&2 | ||
exit 1 | ||
} | ||
|
||
if [ $# -eq 1 ]; then | ||
VERSION=$1 | ||
else | ||
VERSION=$(ruby --version | cut -d' ' -f2 | cut -dp -f1) | ||
fi | ||
|
||
if [ -z "$VERSION" ]; then | ||
die "Please provide an installed/usable Ruby version" | ||
fi | ||
echo "Setting Ruby version to: $VERSION" | ||
|
||
cd "$ROOT" || die "Failed to change to $ROOT" | ||
|
||
# do this first, so rbenv/rvm will automatically pick the desired version | ||
echo "$VERSION" > .ruby-version | ||
|
||
# make sure we're using it | ||
CURRENT_VERSION=$(ruby --version | cut -d' ' -f2 | cut -dp -f1) | ||
if [ -z "$CURRENT_VERSION" ]; then | ||
# rbenv/rvm uses shims, the commands do exist, but do not return a version if misconfigured | ||
die "Missing usable ruby, check your installation" | ||
elif [ "$VERSION" != "$CURRENT_VERSION" ]; then | ||
die "Plese use the ruby version you are trying to set: $VERSION ('$CURRENT_VERSION' in use)" | ||
fi | ||
|
||
echo "$VERSION" > template/_ruby-version | ||
|
||
sed_i -e "s/^\(ruby '\)[^']*\('.*\)$/\1$VERSION\2/" Gemfile | ||
sed_i -e "s/^\(ruby '\)[^']*\('.*\)$/\1$VERSION\2/" template/Gemfile | ||
|
||
rm -f Gemfile.lock template/Gemfile.lock | ||
|
||
bundle lock | ||
(cd template && bundle lock) | ||
|
||
git add \ | ||
.ruby-version \ | ||
Gemfile \ | ||
template/_ruby-version \ | ||
template/Gemfile \ | ||
template/Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs FB copyright header comment, you can copy from the other .sh file in the same dir:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fkgozali ok, can I add my company name or it must be assigned to FB?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the file lives within FB OSS repo, this needs to be under the same FB copyright header