You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2018/12/28 06:18:42 UTC

[arrow] branch master updated: ARROW-4113: [R] Fix version number

This is an automated email from the ASF dual-hosted git repository.

wesm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 0a631db  ARROW-4113: [R] Fix version number
0a631db is described below

commit 0a631dbadb81a95c599ab68a2fd0801144d59f52
Author: Kouhei Sutou <ko...@clear-code.com>
AuthorDate: Fri Dec 28 00:18:31 2018 -0600

    ARROW-4113: [R] Fix version number
    
    Author: Kouhei Sutou <ko...@clear-code.com>
    
    Closes #3278 from kou/r-fix-package-version and squashes the following commits:
    
    17fe7da6 <Kouhei Sutou> Remove R from allow_failures
    50377004 <Kouhei Sutou>  Fix version number
---
 .travis.yml               |  1 -
 dev/release/00-prepare.sh | 41 +++++++++++++++++++++++++++--------------
 r/DESCRIPTION             |  2 +-
 3 files changed, 28 insertions(+), 16 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index b37194f..059daee 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -48,7 +48,6 @@ matrix:
   fast_finish: true
   allow_failures:
   - jdk: oraclejdk9
-  - language: r
   include:
   - name: "Lint C++, Python, R"
     os: linux
diff --git a/dev/release/00-prepare.sh b/dev/release/00-prepare.sh
index 141882e..47ef760 100755
--- a/dev/release/00-prepare.sh
+++ b/dev/release/00-prepare.sh
@@ -22,7 +22,20 @@ set -e
 SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 
 update_versions() {
-  local version=$1
+  local base_version=$1
+  local next_version=$2
+  local type=$3
+
+  case ${type} in
+    release)
+      version=${base_version}
+      r_version=${base_version}
+      ;;
+    snapshot)
+      version=${next_version}-SNAPSHOT
+      r_version=${base_version}.9000
+      ;;
+  esac
 
   cd "${SOURCE_DIR}/../../cpp"
   sed -i.bak -r -e \
@@ -70,7 +83,7 @@ update_versions() {
 
   cd "${SOURCE_DIR}/../../r"
   sed -i.bak -r -e \
-    "s/^Version: .+/Version: ${version}/" \
+    "s/^Version: .+/Version: ${r_version}/" \
     DESCRIPTION
   rm -f DESCRIPTION.bak
   git add DESCRIPTION
@@ -95,8 +108,8 @@ update_versions() {
 
 if [ "$#" -eq 2 ]; then
   version=$1
-  nextVersion=$2
-  nextVersionSNAPSHOT=${nextVersion}-SNAPSHOT
+  next_version=$2
+  next_version_snapshot=${next_version}-SNAPSHOT
   tag=apache-arrow-${version}
 
   echo "Updating changelog for $version"
@@ -113,23 +126,23 @@ if [ "$#" -eq 2 ]; then
   git commit -m "[Release] Update .deb/.rpm changelogs for $version"
   cd -
 
-  echo "prepare release ${version} on tag ${tag} then reset to version ${nextVersionSNAPSHOT}"
+  echo "prepare release ${version} on tag ${tag} then reset to version ${next_version_snapshot}"
 
-  update_versions "${version}"
+  update_versions "${version}" "${next_version}" "release"
   git commit -m "[Release] Update versions for ${version}"
 
   cd "${SOURCE_DIR}/../../java"
   mvn release:clean
-  mvn release:prepare -Dtag=${tag} -DreleaseVersion=${version} -DautoVersionSubmodules -DdevelopmentVersion=${nextVersionSNAPSHOT}
+  mvn release:prepare -Dtag=${tag} -DreleaseVersion=${version} -DautoVersionSubmodules -DdevelopmentVersion=${next_version_snapshot}
   cd -
 
-  echo "Updating versions for ${nextVersionSNAPSHOT}"
-  update_versions "${nextVersionSNAPSHOT}"
-  git commit -m "[Release] Update versions for ${nextVersionSNAPSHOT}"
+  echo "Updating versions for ${next_version_snapshot}"
+  update_versions "${version}" "${next_version}" "snapshot"
+  git commit -m "[Release] Update versions for ${next_version_snapshot}"
 
-  echo "Updating .deb package names for ${nextVersion}"
+  echo "Updating .deb package names for ${next_version}"
   deb_lib_suffix=$(echo $version | sed -r -e 's/^[0-9]+\.([0-9]+)\.[0-9]+$/\1/')
-  next_deb_lib_suffix=$(echo $nextVersion | sed -r -e 's/^[0-9]+\.([0-9]+)\.[0-9]+$/\1/')
+  next_deb_lib_suffix=$(echo $next_version | sed -r -e 's/^[0-9]+\.([0-9]+)\.[0-9]+$/\1/')
   cd $SOURCE_DIR/../tasks/linux-packages/
   for target in debian*/lib*${deb_lib_suffix}.install; do
     git mv \
@@ -150,12 +163,12 @@ if [ "$#" -eq 2 ]; then
   sed -i.bak -r -e "${deb_lib_suffix_substitute_pattern}" rat_exclude_files.txt
   rm -f rat_exclude_files.txt.bak
   git add rat_exclude_files.txt
-  git commit -m "[Release] Update .deb package names for $nextVersion"
+  git commit -m "[Release] Update .deb package names for $next_version"
   cd -
 
   echo "Finish staging binary artifacts by running: sh dev/release/01-perform.sh"
 
 else
-  echo "Usage: $0 <version> <nextVersion>"
+  echo "Usage: $0 <version> <next_version>"
   exit
 fi
diff --git a/r/DESCRIPTION b/r/DESCRIPTION
index 10c28c3..45e0f83 100644
--- a/r/DESCRIPTION
+++ b/r/DESCRIPTION
@@ -1,6 +1,6 @@
 Package: arrow
 Title: R Integration to 'Apache' 'Arrow'
-Version: 0.12.0-SNAPSHOT
+Version: 0.11.0.9000
 Authors@R: c(
     person("Romain", "François", email = "romain@rstudio.com", role = c("aut", "cre")),
     person("Javier", "Luraschi", email = "javier@rstudio.com", role = c("ctb")),