Giter Site home page Giter Site logo

rebar3_depup's Introduction

rebar3_depup Erlang CI

Dependency updater for rebar3 managed projects

Cinderella Upgrade

Usage

Add the plugin to your rebar.config:

{project_plugins, [rebar3_depup]}.

You can add it to your global rebar.config (e.g. ~/.config/rebar3/rebar.config).

Then...

rebar3 update-deps

⚠️ Warning ⚠️

With the default options (see below), this project assumes that…

  1. You have rebar.config file in your root folder
  2. You do not use a rebar.config.script
  3. The current OS user has access to the git repos that you have in your rebar.config file.

Command-Line Options

$ rebar3 help update-deps

A rebar plugin to update dependencies
Usage: rebar3 update-deps [-r [<replace>]] [-c [<rebar_config>]]
                          [-a [<update_approx>]] [-d [<just_deps>]]
                          [-p [<just_plugins>]] [-h [<just_hex>]]
                          [-i <ignore>] [-o [<only>]]

  -r, --replace        Directly replace values in rebar.config. The 
                       default is to just show you what deps can be 
                       updated because this is an experimental feature and 
                       using it can mess up your formatting and comments. 
                       [default: false]
  -c, --rebar-config   File to analyze [default: rebar.config]
  -a, --update-approx  Update requirements starting with '~>' as well as 
                       the ones with a specific version. [default: true]
  -d, --just-deps      Only update deps (i.e. ignore plugins and 
                       project_plugins). [default: false]
  -p, --just-plugins   Only update plugins and project_plugins (i.e. 
                       ignore deps). [default: false]
  -h, --just-hex       Only update hex packages, ignore git repos. 
                       [default: false]
  -i, --ignore         Ignore dep when updating (can be repeated).
  -o, --only           Only update if the specified SemVer component 
                       (major, minor, or patch) has changed. [default: 
                       none]

Configuration

To automatically ignore updates for one or more deps, add the ignore configuration to your rebar.config:

%% Ignore any updates for eredis and lager.
{depup, [{ignore, [eredis, lager]}]}.

To only update if the specified SemVer component has changed, use only. Note that this configuration can be overridden by the -o/--only command-line argument:

%% Ignore any updates that change more than the minor
%% (and patch) version of any dependency.
{depup, [{only, minor}].

With the above configuration in your rebar.config, running the following will update all dependencies by overriding minor with none:

rebar3 update-deps --only none

Build

rebar3 compile

Test

rebar3 test

rebar3_depup's People

Contributors

adroll-rtb-ci avatar elbrujohalcon avatar joshrotenberg avatar kianmeng avatar kivra-pauoli avatar pablocostass avatar paulo-ferraz-oliveira avatar tak30 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rebar3_depup's Issues

Add config to update only patch, minor, major, or all (regardless of semver)

Describe the solution you'd like

I would like to have a command-line option like…

$ rebar3 update-deps --only=major|minor|patch

That will ignore all updates that change more than just that part of the version (i.e. it won't update 0.0.1 to 0.1.0 if only=patch, but it will upgrade it if only=minor.
We need the major option so it only updates versions that respect SemVer. Not including this parameter will also update versions that are not SemVer-respecting ones.

Allow ignoring some specific dep in rebar.config

Is your feature request related to a problem? Please describe.

Sometimes, some dependencies need to be fixed to a particular version, even if there are new ones.

Describe the solution you'd like

I would like to include this in my rebar.config files:

{depup, [{ignore, [eredis, lager]}]}.

…and then rebar3_depup should not even check for newer versions of eredis or lager.

Can't fetch releases from hex

Bug Description

Can't fetch releases from hex.pm

To Reproduce

Try to update a project with a hex.pm dep.

Expected Behavior

To be updated

rebar3 Logs

===> Couldn't fetch latest version of rebar3_format from hex.pm:
{ok,{200,#{},
     [#{dependencies => [],
        inner_checksum =>
            <<249,40,26,82,50,171,22,196,222,127,198,253,143,127,34,130,36,109,
              2,6,106,54,182,73,191,163,94,27,149,42,100,151>>,
        outer_checksum =>
            <<132,165,15,142,160,105,133,173,58,135,83,116,164,210,240,16,76,
              184,49,220,180,74,240,26,58,7,100,185,36,135,85,222>>,
        version => <<"0.0.1">>},
      #{dependencies => [],
        inner_checksum =>
            <<0,155,29,101,183,53,124,243,32,112,218,169,174,153,152,92,162,
              128,183,102,130,104,108,153,222,237,41,166,62,180,189,37>>,
        outer_checksum =>
            <<39,162,68,3,32,135,127,150,152,101,230,244,197,15,251,84,85,214,
              238,131,90,195,20,61,228,227,193,119,50,4,239,185>>,
        version => <<"0.0.2">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<129,160,135,0,241,28,198,151,154,109,156,86,7,15,28,139,162,37,8,
              78,154,66,93,121,76,181,120,185,34,197,202,41>>,
        outer_checksum =>
            <<188,19,149,165,78,121,170,184,218,39,3,207,18,152,180,114,24,80,
              127,113,236,170,73,57,24,153,77,227,86,18,137,40>>,
        version => <<"0.0.3">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<139,43,232,204,200,123,101,132,239,125,24,207,98,66,23,116,237,
              84,107,199,107,58,30,213,109,124,233,220,193,179,36,64>>,
        outer_checksum =>
            <<195,106,217,103,201,78,72,105,169,144,249,27,143,245,93,138,21,
              163,1,174,157,124,90,55,10,138,77,245,77,225,90,23>>,
        version => <<"0.0.4">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<124,136,47,94,131,139,122,49,68,255,68,18,81,236,31,163,59,137,
              14,183,24,196,114,66,150,172,141,52,230,205,90,140>>,
        outer_checksum =>
            <<16,231,142,37,98,19,57,61,109,139,144,250,39,183,177,243,31,110,
              120,51,151,204,50,127,35,65,161,251,250,50,172,92>>,
        version => <<"0.1.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<60,95,127,137,179,14,224,184,136,105,18,218,200,155,211,159,35,
              191,70,203,174,118,133,126,72,120,45,220,192,170,46,168>>,
        outer_checksum =>
            <<164,51,149,144,229,130,227,228,91,104,114,151,194,196,48,197,213,
              239,157,92,123,250,117,166,137,36,137,251,3,211,154,106>>,
        version => <<"0.2.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>},
             #{package => <<"redbug">>,requirement => <<"~>1.2.1">>}],
        inner_checksum =>
            <<91,71,69,220,136,94,18,227,140,80,97,213,142,135,200,195,152,75,
              69,36,165,41,152,70,162,182,165,122,190,116,139,211>>,
        outer_checksum =>
            <<133,79,94,42,128,189,98,109,175,134,177,246,92,21,137,213,199,
              232,22,94,29,166,219,17,157,195,0,40,103,84,110,234>>,
        version => <<"0.2.1">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<197,167,74,76,69,233,95,90,185,129,208,250,158,238,191,34,76,62,
              144,244,105,145,204,189,31,102,202,232,141,226,242,19>>,
        outer_checksum =>
            <<2,82,224,173,242,141,133,2,172,70,121,132,0,134,116,227,139,140,
              250,246,167,138,10,41,226,193,203,99,80,231,162,163>>,
        version => <<"0.2.2">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<23,212,148,232,60,161,201,135,129,159,114,89,29,146,86,251,6,43,
              240,179,52,153,2,184,113,241,187,71,240,31,120,235>>,
        outer_checksum =>
            <<62,165,7,183,35,157,31,159,152,173,100,94,135,245,8,102,111,145,
              0,56,153,153,183,89,65,108,221,99,151,176,146,102>>,
        version => <<"0.2.3">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<199,155,120,201,198,57,31,194,204,217,2,137,237,161,197,89,10,
              229,253,45,93,162,157,2,197,223,148,18,33,192,246,66>>,
        outer_checksum =>
            <<4,90,167,208,177,72,61,51,93,92,131,32,3,68,8,158,207,79,146,108,
              83,12,30,241,53,210,226,127,71,67,6,118>>,
        version => <<"0.3.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<45,185,1,58,239,88,165,253,79,127,31,72,233,89,215,4,124,57,53,
              232,218,50,98,45,230,175,228,124,82,216,116,139>>,
        outer_checksum =>
            <<72,137,88,131,142,181,135,159,243,215,54,24,254,47,111,30,239,
              149,242,134,98,133,46,137,151,129,166,130,55,203,159,22>>,
        version => <<"0.3.1">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<233,231,162,177,152,250,113,184,90,1,248,29,24,105,145,146,154,
              234,203,68,187,206,229,3,35,143,168,205,164,136,113,16>>,
        outer_checksum =>
            <<244,223,142,177,54,162,125,36,8,114,1,122,56,188,72,253,162,72,
              191,191,95,201,107,176,72,255,184,120,248,198,49,72>>,
        version => <<"0.3.2">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<129,237,13,116,119,233,206,21,29,124,175,165,88,247,6,46,185,142,
              172,145,101,200,157,10,181,65,198,224,168,69,176,221>>,
        outer_checksum =>
            <<211,178,64,186,221,15,143,216,170,66,36,90,140,28,74,111,242,77,
              241,23,155,225,150,140,228,44,153,42,213,79,214,47>>,
        version => <<"0.4.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<46,160,81,89,1,75,12,16,229,2,20,238,12,166,107,74,148,162,3,22,
              16,92,156,56,228,75,201,236,80,121,149,25>>,
        outer_checksum =>
            <<228,137,135,98,252,75,187,110,157,75,69,234,242,189,250,143,7,34,
              184,149,208,140,45,4,26,8,161,74,248,70,154,101>>,
        version => <<"0.4.1">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<85,232,241,218,242,232,168,205,198,71,146,52,227,178,119,40,31,
              141,13,225,198,253,23,192,129,222,67,92,204,213,222,117>>,
        outer_checksum =>
            <<29,139,182,126,76,60,138,77,208,214,147,178,108,155,202,120,78,
              89,24,80,231,252,190,181,62,153,166,211,78,195,148,222>>,
        version => <<"0.5.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<207,197,21,146,185,37,68,223,33,81,221,101,27,132,143,32,189,89,
              104,75,54,117,185,155,171,245,135,250,173,56,77,79>>,
        outer_checksum =>
            <<233,192,72,16,151,207,163,95,69,48,8,54,72,248,223,111,229,249,
              101,191,120,10,13,225,14,2,38,100,131,253,63,222>>,
        version => <<"0.6.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"0.2.1">>}],
        inner_checksum =>
            <<149,161,255,252,193,34,81,22,122,205,202,59,35,149,70,112,158,
              168,18,132,66,158,131,174,213,123,14,15,33,90,119,40>>,
        outer_checksum =>
            <<72,4,152,111,242,5,250,72,232,199,56,153,14,248,55,106,106,153,
              54,30,141,166,161,39,73,231,250,121,95,89,63,60>>,
        version => <<"0.7.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.0.1">>}],
        inner_checksum =>
            <<46,86,41,120,238,92,250,62,39,187,85,190,53,111,181,15,184,130,0,
              193,170,146,213,6,65,62,28,25,68,211,20,189>>,
        outer_checksum =>
            <<57,123,81,41,235,94,76,250,75,153,39,187,175,186,53,92,241,228,
              174,44,242,59,228,12,2,209,156,251,146,144,187,241>>,
        version => <<"0.8.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.0.1">>}],
        inner_checksum =>
            <<215,232,146,246,153,252,194,92,182,204,10,199,9,227,229,40,211,
              209,234,248,172,182,156,40,66,82,30,120,72,123,222,160>>,
        outer_checksum =>
            <<253,116,21,7,4,155,91,209,80,145,126,239,162,7,19,153,191,71,154,
              70,136,95,115,28,63,182,237,220,111,179,65,232>>,
        version => <<"0.8.1">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.0.3">>}],
        inner_checksum =>
            <<45,100,218,97,224,184,127,202,108,69,18,173,166,217,203,194,178,
              122,220,154,230,132,65,120,86,17,71,231,18,23,97,189>>,
        outer_checksum =>
            <<202,143,242,118,56,194,22,149,147,209,68,157,172,190,136,149,99,
              65,147,237,51,52,233,6,181,79,201,127,8,31,82,19>>,
        version => <<"0.8.2">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.1.0">>}],
        inner_checksum =>
            <<228,235,15,35,55,69,39,160,222,196,116,237,120,185,90,117,43,175,
              241,196,200,237,33,158,247,114,184,193,65,218,189,147>>,
        outer_checksum =>
            <<214,192,195,197,74,200,31,63,160,95,204,185,242,32,90,238,64,119,
              179,80,243,157,163,61,98,65,61,75,95,144,70,154>>,
        version => <<"0.9.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.1.1">>}],
        inner_checksum =>
            <<91,9,64,17,143,79,158,248,34,173,3,109,186,21,25,162,6,4,203,168,
              168,207,33,100,244,45,226,41,111,211,109,78>>,
        outer_checksum =>
            <<125,52,170,249,240,231,189,116,249,178,140,242,70,3,187,229,103,
              70,123,206,66,82,21,128,200,85,128,16,94,84,125,212>>,
        version => <<"0.10.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.1.1">>}],
        inner_checksum =>
            <<8,152,95,140,254,49,31,194,142,94,171,113,143,86,64,239,53,73,40,
              180,49,101,213,56,221,180,236,128,138,70,124,67>>,
        outer_checksum =>
            <<118,226,43,125,206,126,116,144,24,56,5,28,76,63,223,10,79,11,157,
              60,108,175,146,217,81,59,18,147,59,127,110,70>>,
        version => <<"0.10.1">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.1.1">>}],
        inner_checksum =>
            <<249,168,255,25,119,89,184,151,28,50,103,137,71,196,132,10,92,194,
              29,223,247,151,148,179,90,250,215,91,120,130,156,225>>,
        outer_checksum =>
            <<95,18,237,160,152,37,7,108,89,146,86,28,162,137,149,247,244,190,
              252,43,73,153,83,45,102,188,99,29,51,218,187,93>>,
        version => <<"1.0.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.1.1">>}],
        inner_checksum =>
            <<248,210,117,201,189,154,37,65,136,13,3,7,26,247,95,214,183,143,
              200,13,116,21,141,192,162,196,138,145,59,3,217,244>>,
        outer_checksum =>
            <<56,150,250,139,202,32,28,138,107,114,93,93,230,126,0,49,240,10,8,
              124,75,230,155,66,2,202,126,167,170,13,169,227>>,
        version => <<"1.0.1">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"1.2.0">>}],
        inner_checksum =>
            <<104,30,241,62,222,191,172,15,101,73,205,80,59,49,155,201,220,198,
              29,153,219,156,243,99,189,195,188,233,125,255,199,159>>,
        outer_checksum =>
            <<243,99,107,142,49,138,218,153,10,234,108,40,170,38,13,94,32,16,
              45,160,145,187,202,64,189,152,129,85,174,23,21,223>>,
        version => <<"1.1.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"~> 2.0.0">>}],
        inner_checksum =>
            <<239,34,69,193,228,217,223,188,6,242,27,114,49,36,165,25,158,238,
              92,116,219,210,153,146,202,248,203,198,174,80,234,249>>,
        outer_checksum =>
            <<194,209,47,193,229,226,132,135,57,215,45,137,157,136,147,253,44,
              147,200,162,231,222,206,19,152,252,82,17,190,128,74,243>>,
        version => <<"1.2.0">>},
      #{dependencies =>
            [#{package => <<"katana_code">>,requirement => <<"~> 2.0.0">>}],
        inner_checksum =>
            <<184,194,80,192,9,231,33,7,243,74,124,69,79,29,127,117,252,179,78,
              216,21,114,171,254,143,19,44,173,92,196,9,157>>,
        outer_checksum =>
            <<72,42,216,178,53,251,27,84,65,15,244,217,251,60,225,144,249,187,
              195,44,151,29,85,140,24,160,8,50,235,228,194,125>>,
        version => <<"1.2.1">>}]}}

Tweak plugin output message for `run rebar3 upgrade`

Bug Description

Output from the plugin states run rebar3 upgrade, but these days you have to either run upgrade <dep> or upgrade --all. Don't know if you wanna be so specific, though.

Expected Behavior

Output from the plugin should state run rebar3 upgrade --all | <dep>.

Additional Context

Using the latest plugin version

Output profile -related name if analysis is for profile

Is your feature request related to a problem? Please describe.

I have gun as a dependency in my test profile. I maybe also have it in other profiles. The plugin's output states that gun needs to be updated but not the profile section it's in.

Describe the solution you'd like

Have the plugin output gun needs to be updated (profile: test), for example.

Private repositories seem unreachable

Is your feature request related to a problem? Please describe.

I have, in my rebar.config, references to non-public (i.e. non GitHub, ... and non Hex) Git repositories. rebar3_hank can't seem to reach them. It also finishes execution without error/warning messages.

Describe the solution you'd like

At a first stage, I'd like to have a clear error/warning message stating a given repository was unreachable (but have rebar3_deps continue for other repositories).
At a second stage, I'd like to have those repo.s be reachable.
(if this problem is already known, a README.md update might be "enough" for now)

Describe alternatives you've considered

I comment out the entries in the rebar.config file, run rebar3 update-deps and then remove the comments (and check the versions manually, as I did prior to using the plugin).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.