Benoit Daloze
d195ecb9ec
Move Bundler-related logic to a separate file
2021-01-08 20:56:31 +01:00
Manuel Meurer
c34fe21c5f
Install specific bundler version when minor and patch versions are given ( #139 )
2021-01-07 14:03:20 +01:00
Benoit Daloze
1771151f64
Error if $BUNDLE_GEMFILE is set but does not exist
2020-12-22 11:46:12 +01:00
Benoit Daloze
f5db46ebcb
Fix version check
2020-12-22 11:18:45 +01:00
Benoit Daloze
dc58db7220
Use an absolute path for bundle config --local path
...
* See https://github.com/ruby/setup-ruby/issues/131
2020-12-21 21:13:02 +01:00
Benoit Daloze
1482e9180a
Install the exact same Bundler version as in the lockfile if there is a lockfile
2020-12-11 14:46:33 +01:00
Benoit Daloze
f6f61ea575
Fix checks for Bundler version to consider an exact version like 2.1.4
2020-12-11 14:46:33 +01:00
Benoit Daloze
084885eaca
Only set $BUNDLER_VERSION when needed (Bundler 1, Ruby >= 2.7)
2020-12-09 16:51:47 +01:00
Benoit Daloze
e5a267414f
Fix value for options
2020-12-07 21:12:36 +01:00
ojab
cadade3366
Pass selected Bundler version to bundle config & bundle lock
2020-12-07 21:06:26 +01:00
ojab
30f5e2d4cd
Fixup bundler version for rubies with bundler as a default gem
...
Fixes #117
2020-12-05 15:40:47 +01:00
Benoit Daloze
2a0be7a409
Try stable versions first, and then try non-head versions
...
* Fixes https://github.com/ruby/setup-ruby/issues/115
2020-12-05 12:52:21 +01:00
Benoit Daloze
bacba738b2
Run bundle clean when reusing a cache and the lockfile changed
...
* Fixes https://github.com/ruby/setup-ruby/issues/113
2020-12-02 17:36:27 +01:00
Benoit Daloze
e38f9abc9e
Fix usages of string.split(sep, limit)
...
* Since the limit just removes further matches in JavaScript.
2020-11-19 00:33:40 +01:00
Benoit Daloze
7c2bf7263d
Ensure an engine-only ruby-version picks the latest stable version and not a preview or RC
2020-11-18 21:52:51 +01:00
Benoit Daloze
ad1ebae995
Also include the version in the platform for macos and windows
...
* Guess the platform based on $ImageOS.
2020-11-12 20:23:53 +01:00
Benoit Daloze
f4a8aa6c33
Use ImageOS for the cache key, so it also includes the OS version
2020-11-12 19:59:05 +01:00
Benoit Daloze
bc0f274d1c
Fix Bundler cache when there is no Gemfile.lock
...
* Always show the list of installed gems in the log.
2020-11-12 19:34:43 +01:00
Benoit Daloze
1c896c8ea1
Always use Bundler 1 for JRuby 9.1.x
2020-11-12 19:08:42 +01:00
Benoit Daloze
bb3a0c6e0b
Bundler 2 is shipped with truffleruby-head now
2020-11-10 15:33:41 +01:00
Benoit Daloze
339f055c86
Clarify Windows check
2020-11-10 11:35:50 +01:00
Benoit Daloze
ebed7f7b66
Invalidate cache key since Rubies are installed in the toolcache now
...
* Some gems might capture the absolute path of the Ruby prefix.
2020-11-09 13:01:13 +01:00
Benoit Daloze
933dca770c
Extract CRuby releases under $RUNNER_TOOL_CACHE
2020-11-09 13:00:42 +01:00
Benoit Daloze
693cf1794d
Include the Gemfile path in the cache key
...
* See https://github.com/ruby/setup-ruby/issues/103#issuecomment-723960352
2020-11-09 13:00:04 +01:00
Benoit Daloze
efda314f4a
Remove Rubinius support
...
* Fixes https://github.com/ruby/setup-ruby/issues/101
2020-11-09 12:50:25 +01:00
Benoit Daloze
b62e5d53aa
Take advantage that detectGemfiles() only returns existing paths
...
* So use !== null instead of redoing the existsSync() check.
* Rename a few variables for consistency.
2020-09-19 11:31:18 +02:00
Samuel Williams
1c172ef5dc
Add support for gems.rb/gems.locked during bundle install ( #84 )
...
* Extract detection of gemfile and lockfile.
2020-09-19 11:18:52 +02:00
Benoit Daloze
108b3a2c8a
Various cleanups
2020-09-03 13:42:03 +02:00
MSP-Greg
6ead459c74
Add envPreInstall, common.setupPath, use MSYS2 bash for Windows bash
...
envPreInstall - sets ENV values for runners
common.setupPath - collects all Path operations into one function, runs before Ruby install
Add MSYS2 paths to all Windows builds for MSYS2 Bash use
2020-09-03 12:13:49 +02:00
Benoit Daloze
568cdbf232
Revert "Add support for gems.rb/gems.locked during bundle install."
...
* This reverts commit 638e8fff19 .
* Needs some fixes and review.
2020-09-03 11:58:37 +02:00
Samuel Williams
638e8fff19
Add support for gems.rb/gems.locked during bundle install.
2020-09-03 10:48:45 +12:00
Attila Večerek
1682e5e389
Read path to gemfile from env variable
2020-08-13 20:18:19 +02:00
Attila Večerek
25388a3d11
Accept a path in readBundledWithFromGemfileLock
2020-08-13 20:18:19 +02:00
Holger Just
5a76bd6a5f
Add support for Ruby 2.1 ( #71 )
2020-07-16 22:23:31 +02:00
Benoit Daloze
40bbc5ec66
Also include the commit in the cache key for truffleruby-head
...
* That way new caches can be created if the previous cache is for a different commit.
2020-07-11 16:08:35 +02:00
Benoit Daloze and Eliza Brock Marcum
1bb7de255b
Treat error from restoring the cache as a cache miss ( #68 )
...
* Don't retry or error out on restore cache errors
Co-authored-by: Eliza Brock Marcum <eliza@elizamarcum.com >
2020-07-11 16:02:33 +02:00
MSP-Greg
271876da60
Allow running external function before 'bundle install'
...
External actions may use setup-ruby, and some actions make changes/additions to the build environment. These may be needed for dependencies.
Hence, allow those external actions to run code before 'bundle install'. This is done by passing a function as a parameter to setupRuby().
2020-07-01 21:22:43 +02:00
Benoit Daloze
c8a88df157
Refactor how to call setup-ruby from other actions
...
* Automatically use inputs if available, use defaults otherwise.
2020-06-14 16:51:29 +02:00
Benoit Daloze
d57231c9a3
Implement automatic bundle install and caching
...
* Not yet enabled by default.
2020-06-14 13:22:16 +02:00
Benoit Daloze
81be0938f7
Add an exported setupRuby() function which can be called from other actions
...
* Inputs are passed as simple object properties.
* It is recommended to expose the same inputs for other actions.
* See #58 and #33 .
2020-06-06 13:52:42 +02:00
Benoit Daloze
b04e5b8846
Use Bundler 1 on Ruby 2.3
...
* At least until there is a new Bundler 2 release fixing this.
* Fixes https://github.com/ruby/setup-ruby/issues/51
2020-06-06 13:16:46 +02:00
Benoit Daloze
23b9735206
Fix checks for head versions
...
* Always use common.isHeadVersion().
2020-05-15 13:01:01 +02:00
Benoit Daloze
e5857dbffe
Pass the validated engine and version to install()
2020-05-13 23:36:33 +02:00
Benoit Daloze
9f60be7c73
Extract main logic in its own function
...
* So there isn't a giant try/catch around it.
2020-04-18 13:24:09 +02:00
Chris Bailey
29eefdda13
Add support for setting a working directory
2020-04-18 13:22:34 +02:00
Benoit Daloze
f25e77d702
Do not show a "Installing Bundler" group if bundler: none
...
* That was rather confusing.
2020-04-05 20:04:22 +02:00
Benoit Daloze
56996937ab
Clarify messages about the shipped Bundler being reused
2020-04-05 14:16:21 +02:00
Benoit Daloze
e9b0369f85
Add groups to clarify output and measure the time each group takes
2020-04-05 14:09:18 +02:00
Benoit Daloze
045dd42354
Fix indentation
2020-04-05 13:51:43 +02:00
Benoit Daloze
152ff008a3
Extract utility methods to common.js
2020-04-05 13:27:45 +02:00