Skip to content

Commit 136331e

Browse files
committed
fix(daml-export): add DAML_TOKEN arg parse
Signed-off-by: Kevin O'Donnell <kevin@blockchaintp.com>
1 parent d89241a commit 136331e

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

bash/daml-export

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,23 @@ function exportRange {
7070
rm -rf "$base_dir*"
7171
rm -rf "$dir"
7272
mkdir -p "$dir"
73-
#-Dlogback.configurationFile=/home/user/.daml/sdk/${DAML_VERSION}/daml-sdk/export-logback.xml \
74-
java -Xmx32000m \
75-
-jar "/home/user/.daml/sdk/${DAML_VERSION}/daml-sdk/daml-sdk.jar" \
76-
export script --all-parties --sdk-version "${EXPORT_SDK}" \
77-
--acs-batch-size 1 \
78-
-o "$dir" --host localhost --port 9000 \
79-
--start "$start$_extra" --end "$stop$_extra"
73+
if [ -z "$DAML_TOKEN" ]; then
74+
#-Dlogback.configurationFile=/home/user/.daml/sdk/${DAML_VERSION}/daml-sdk/export-logback.xml \
75+
java -Xmx32000m \
76+
-jar "/home/user/.daml/sdk/${DAML_VERSION}/daml-sdk/daml-sdk.jar" \
77+
export script --all-parties --sdk-version "${EXPORT_SDK}" \
78+
--acs-batch-size 1 \
79+
-o "$dir" --host localhost --port 9000 \
80+
--start "$start$_extra" --end "$stop$_extra"
81+
else
82+
java -Xmx32000m \
83+
-jar "/home/user/.daml/sdk/${DAML_VERSION}/daml-sdk/daml-sdk.jar" \
84+
export script --all-parties --sdk-version "${EXPORT_SDK}" \
85+
--acs-batch-size 1 \
86+
-o "$dir" --host localhost --port 9000 \
87+
--start "$start$_extra" --end "$stop$_extra" \
88+
--access-token-tile "$DAML_TOKEN"
89+
fi
8090
export_exit=$?
8191
if [ $export_exit -eq 0 ]; then
8292
touch "$dir/export.good"

0 commit comments

Comments
 (0)