Skip to content

Commit ccac86d

Browse files
committed
fix errors in bash that unable to read versions
1 parent ce80946 commit ccac86d

3 files changed

Lines changed: 24 additions & 4 deletions

File tree

hugegraph-commons/hugegraph-common/src/main/resources/version.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
# When updating the version, Version can be read from the pom file.
17+
# When hugegraph-common is updated, hugegraph-commons.version in the pom file needs to be updated,
18+
# and VersionInBash needs to be updated in this file.
1619
Version=${revision}
1720
ApiVersion=0.71
1821
ApiCheckBeginVersion=1.0
1922
ApiCheckEndVersion=1.7
23+
VersionInBash=1.5

hugegraph-server/hugegraph-dist/src/assembly/travis/start-pd.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@
1818
set -ev
1919

2020
HOME_DIR=$(pwd)
21-
source $HOME_DIR/hugegraph-commons/hugegraph-common/src/main/resources/version.properties
22-
PD_DIR=$HOME_DIR/hugegraph-pd/apache-hugegraph-pd-incubating-${Version}
21+
22+
PROPERTIES_FILE="$HOME_DIR/hugegraph-commons/hugegraph-common/src/main/resources/version.properties"
23+
if [ -f "$PROPERTIES_FILE" ]; then
24+
export $(grep -v '^#' "$PROPERTIES_FILE" | xargs)
25+
else
26+
echo "Error: properties file not found at $PROPERTIES_FILE"
27+
exit 1
28+
fi
29+
30+
PD_DIR=$HOME_DIR/hugegraph-pd/apache-hugegraph-pd-incubating-$VersionInBash
2331

2432
pushd $PD_DIR
2533
. bin/start-hugegraph-pd.sh

hugegraph-server/hugegraph-dist/src/assembly/travis/start-store.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,16 @@
1818
set -ev
1919

2020
HOME_DIR=$(pwd)
21-
source $HOME_DIR/hugegraph-commons/hugegraph-common/src/main/resources/version.properties
22-
STORE_DIR=$HOME_DIR/hugegraph-store/apache-hugegraph-store-incubating-${Version}
21+
22+
PROPERTIES_FILE="$HOME_DIR/hugegraph-commons/hugegraph-common/src/main/resources/version.properties"
23+
if [ -f "$PROPERTIES_FILE" ]; then
24+
export $(grep -v '^#' "$PROPERTIES_FILE" | xargs)
25+
else
26+
echo "Error: properties file not found at $PROPERTIES_FILE"
27+
exit 1
28+
fi
29+
30+
STORE_DIR=$HOME_DIR/hugegraph-store/apache-hugegraph-store-incubating-$VersionInBash
2331

2432
pushd $STORE_DIR
2533
. bin/start-hugegraph-store.sh

0 commit comments

Comments
 (0)