Mina: Recibiendo las siguientes advertencias al usar bundler 2.1.2

Creado en 3 ene. 2020  ·  8Comentarios  ·  Fuente: mina-deploy/mina

[DEPRECATED] The `--deployment` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set deployment 'true'`, and stop using this flag
[DEPRECATED] The `--path` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set path 'vendor/bundle'`, and stop using this flag
[DEPRECATED] The `--without` flag is deprecated because it relies on being remembered across bundler invocations, which bundler will no longer do in future versions. Instead please use `bundle config set without 'development test'`, and stop using this flag

Comentario más útil

@Haelle Seguramente sería preferible la compatibilidad con el último Bundler estable, ya que se recomiendan actualizaciones. Mina podría recomendar una versión más nueva y, por lo tanto, más estable de Bundler. Actualmente, Mina no se puede utilizar con el último Bundler de producción.

Todos 8 comentarios

mismas advertencias aquí con Bundler 2.1.4

Y bundle:clean falla con:

$ /usr/local/rbenv/shims/bundle clean --without development test --path "vendor/bundle" --deployment
       Unknown switches "--without", "--path", "--deployment"
 !     ERROR: Deploy failed.

¿Alguna información adicional sobre esto?

Para cualquiera que llegue aquí, estoy usando la siguiente solución:

Primero elimino las opciones predeterminadas del paquete.

set :bundle_options, -> { '' }

Luego agrego lo siguiente a mi tarea setup .

command "#{fetch(:bundle_bin)} config set deployment 'true'"
command "#{fetch(:bundle_bin)} config set path '#{fetch(:bundle_path)}'"
command "#{fetch(:bundle_bin)} config set without '#{fetch(:bundle_withouts)}'"

Esto resuelve las advertencias de depreciación y establece la configuración del paquete a nivel mundial. Me encantaría escribir un parche para esto si es algo que se fusionará.

Publicación de blog aquí: Implementaciones de Mina que causan advertencias de depreciación de Bundler .

Esto se rompería para cualquiera que use el Bundler 1.

Y no estoy seguro de que el equipo de Mina quiera manejar un código con un if bundler_1? do xxx esle do yyy

Una opinión de ellos ayudaría a la dirección de un PR

@Haelle Seguramente sería preferible la compatibilidad con el último Bundler estable, ya que se recomiendan actualizaciones. Mina podría recomendar una versión más nueva y, por lo tanto, más estable de Bundler. Actualmente, Mina no se puede utilizar con el último Bundler de producción.

+1

Hola @thelucid, ¿puedes explicarlo con más detalle?
¿Dónde está este conjunto: bundle_options, -> {''} opciones?
y donde agregaré los comandos anteriores. Estoy usando gitlab runner y fastline para la distribución de la aplicación. así que tengo el archivo gitlab-ci.yml aquí un script como

  • instalación del paquete --ruta ./tmp-fastlane-ci-bundle

@thelucid dijo:

Para cualquiera que llegue aquí, estoy usando la siguiente solución:

command "#{fetch(:bundle_bin)} config set deployment 'true'"
command "#{fetch(:bundle_bin)} config set path '#{fetch(:bundle_path)}'"
command "#{fetch(:bundle_bin)} config set without '#{fetch(:bundle_withouts)}'"

Esto resuelve las advertencias de depreciación y establece la configuración del paquete a nivel mundial. Me encantaría escribir un parche para esto si es algo que se fusionará.

¿No tiene más sentido usar:

namespace :bundle do
  desc 'Sets the Bundler config options.'
  task :config do
    comment %{Setting the Bundler config options}
    command %{#{fetch(:bundle_bin)} config set --local deployment 'true'}
    command %{#{fetch(:bundle_bin)} config set --local path '#{fetch(:bundle_path)}'}
    command %{#{fetch(:bundle_bin)} config set --local without '#{fetch(:bundle_withouts)}'}
  end
end

… En cada implementación (observe el --local )? Por ejemplo, puedo imaginar el without cambiando entre lanzamientos.

¿Fue útil esta página
0 / 5 - 0 calificaciones