File: release.sh

package info (click to toggle)
jruby 9.4.8.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 89,244 kB
  • sloc: ruby: 548,574; java: 276,189; yacc: 25,873; ansic: 6,178; xml: 6,111; sh: 1,855; sed: 94; makefile: 78; jsp: 48; tcl: 40; exp: 12
file content (67 lines) | stat: -rw-r--r-- 2,299 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh

# Notes on this script:
#  1. on failed run you must undo the version commit and probably should drop in nexus staging repo
#  2. Assumes jruby you are using in your PATH works

export REPO=${REPO:=jruby}

java_version=$(java -version 2>&1 | head -1 | awk -F\" -e '{ print $2 }' | awk -F. '{print $1 "." $2 }')

if [ "$java_version" != "1.8" ]; then
   echo "You must use Java 1.8 to release JRuby"
   exit 1
fi

[[ -z "$JRUBY_VERSION" ]] && { echo "set JRUBY_VERSION to something" ; exit 1; }

export WINDOWS_VERSION=`echo $JRUBY_VERSION|sed -e 's/\./_/g'`
echo $JRUBY_VERSION > VERSION

set -x

mvn
git add VERSION core/pom.xml lib/pom.xml  pom.xml shaded/pom.xml
git commit -m "Version $JRUBY_VERSION updated for release"
cd ..
rm -rf release
git clone $REPO release
cd release
pwd
mvn clean deploy -Psonatype-oss-release -Prelease
jruby -S rake post_process_artifacts

cd release

# Install4j has changed how it writes this out so fix it in post
mv jruby_windows-x32_${WINDOWS_VERSION}.exe jruby_windows_${WINDOWS_VERSION}.exe
mv jruby_windows-x32_${WINDOWS_VERSION}.exe.md5 jruby_windows_${WINDOWS_VERSION}.exe.md5
mv jruby_windows-x32_${WINDOWS_VERSION}.exe.sha1 jruby_windows_${WINDOWS_VERSION}.exe.sha1
mv jruby_windows-x32_${WINDOWS_VERSION}.exe.sha256 jruby_windows_${WINDOWS_VERSION}.exe.sha256
mv jruby_windows-x32_${WINDOWS_VERSION}.exe.sha512 jruby_windows_${WINDOWS_VERSION}.exe.sha512

pwd
DOWNLOADS=s3://jruby.org/downloads
VERSION=$JRUBY_VERSION

for FILE in jruby-bin-${VERSION}.tar.gz jruby-bin-${VERSION}.zip jruby-complete-${VERSION}.jar jruby-jars-${VERSION}.gem jruby-src-${VERSION}.tar.gz jruby-src-${VERSION}.zip jruby_windows_${WINDOWS_VERSION}.exe jruby_windows_x64_${WINDOWS_VERSION}.exe
do

    echo s3cmd sync --verbose ${FILE} ${DOWNLOADS}/${VERSION}/${FILE}
    s3cmd sync --verbose ${FILE} ${DOWNLOADS}/${VERSION}/${FILE}
    
    for FINGERPRINT in md5 sha1 sha256 sha512
    do
        
        s3cmd put --verbose ${FILE}.${FINGERPRINT} ${DOWNLOADS}/${VERSION}/${FILE}.${FINGERPRINT}
        
    done

done


s3cmd setacl ${DOWNLOADS}/${VERSION} --acl-public --recursive

# At this point you should run scripts on platforms to make sure things look ok.
# FIXME: we should consider running a collection of scripts we can automate here and add to CI.