2

I'd like to automatically update Version in R package DESCRIPTION file on every merge after pull request. Are there any tools, hooks, etc. created to do this job? Or maybe it is not good approach to the matter?

Here is example DESCRIPTION file:

Package: app
Title: Test version of app
Version: 0.9.4
Date: 2017-09-01
Description: example app
License: 
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
Depends:
    R (>= 3.3.1),
    Biobase,
    shiny,
    R6,
    shinyjs,
    grid,
    RColorBrewer
Suggests:
    testthat,
    lintr,
    png,
    knitr
Imports:
    magrittr,
    binom,
    ggplot2,
    gplots,
    Hmisc,
    MASS,
    nlme
Taz
  • 5,755
  • 6
  • 26
  • 63
  • 2
    I had a related question about [best practices for versioning with git](https://stackoverflow.com/q/45061918/210673) and I found another question about [automating version increase when building](https://stackoverflow.com/q/24209336/210673). Neither are quite what you're looking for but might be a place to start. – Aaron left Stack Overflow Sep 11 '17 at 14:44
  • 1
    So, to set up the trigger, you'll need to edit your git (or SVN, etc) installation and then you'll write some shell script to do this that's appropriate to your OS. Have you gotten started? – Hack-R Sep 11 '17 at 14:48
  • Hack-R, No I didn't yet. Could you show me how to start? – Taz Sep 11 '17 at 16:28
  • Much depends on which repo and build system you are using. My advice is to generate files at build time, that have any version data in them. Depending on your system, this is likely going to be a custom build step of some kind. – jwdonahue Dec 16 '17 at 21:58
  • Taz, Did you ever find a solution to this problem? – jwdonahue Jun 28 '18 at 20:48
  • @jwdonahue unfortunately not – Taz Jun 28 '18 at 21:16

0 Answers0