Skip to content

Commit 6d2856c

Browse files
author
archana
committed
openj9-openjdk-jdk8 mirror script should mirror oracle "build level" not
head. The mirror script currently detects a new Oracle build level and mirrors it, but it mirrors the "head" rather than the actual "build level". The changes in this script fix that problem and it reset the tag with latest new tag from oracle. More detail of the fix can be found in: https://github.ibm.com/runtimes/openjdk-contribution/issues/217 Signed-off-by: Archana Nogriya <[email protected]>
1 parent cf532e1 commit 6d2856c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

scripts/update8.sh

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
#
33
# ===========================================================================
4-
# (c) Copyright IBM Corp. 2017 All Rights Reserved
4+
# (c) Copyright IBM Corp. 2018 All Rights Reserved
55
# ===========================================================================
66
#
77
# This code is free software; you can redistribute it and/or modify it
@@ -24,7 +24,12 @@ set -euo pipefail
2424
echo "Common defs"
2525

2626
# shellcheck disable=SC1091
27-
source import-common.sh
27+
modules=(corba langtools jaxp jaxws nashorn jdk)
28+
29+
# These variables needs to define in Jenkin's job pipeline
30+
#WORKSPACE="<Define local workspace path where clone and merge is going to take place>"
31+
#GITHUB_IBM="<Path for extension git repo>"
32+
#J9REPOSITORY="<extention repo name, where merge will be pushed>"
2833

2934
rm -rf $WORKSPACE/openj9
3035
rm -rf $WORKSPACE/openjdk
@@ -57,10 +62,10 @@ git filter-branch -f --index-filter 'git rm -r -f -q --cached --ignore-unmatch .
5762
cd ..
5863
git pull jdk8u
5964
git fetch --tags jdk8u
60-
rm -rf jdk8u.git
61-
6265
NEWTAG=$(git describe --abbrev=0 --tags)
6366
echo "Latest openjdk level is $NEWTAG"
67+
git reset --hard $NEWTAG
68+
rm -rf jdk8u.git
6469

6570
if [ $NEWTAG != $OLDTAG ]
6671
then
@@ -85,6 +90,8 @@ then
8590
cd ..
8691
echo "GIT pull on $module"
8792
git pull $module
93+
git fetch --tags $module
94+
git reset --hard $NEWTAG
8895
rm -rf $module.git
8996
cd $WORKSPACE/openj9/$J9REPOSITORY
9097
git fetch $WORKSPACE/openjdk/$module
@@ -102,5 +109,4 @@ then
102109

103110
else
104111
echo "No new tag. No update done"
105-
fi
106-
112+
fi

0 commit comments

Comments
 (0)