Skip to content

Commit 30c8c99

Browse files
committed
next rc
1 parent df5aa87 commit 30c8c99

File tree

6 files changed

+65
-26
lines changed

6 files changed

+65
-26
lines changed

dabl-meta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
catalog:
22
name: da-marketplace
3-
version: 0.3.0-rc.2
3+
version: 0.3.0-rc.3
44
short_description: DA Marketplace
55
description: A marketplace for issuing and trading digital tokens.
66
release_date: 2020-10-14
77
author: Digital Asset (Switzerland) GmbH
88
url: https://github.com/digital-asset/da-marketplace
99
source_url: https://github.com/digital-asset/da-marketplace
1010
license: 0BSD
11-
tags: [dabl-sample-app, application, experimental]
11+
tags: '[dabl-sample-app, application, experimental]'
1212
icon_file: da-marketplace.svg
1313
subdeployments:
1414
- da-marketplace-0.3.0.dar
1515
- da-marketplace-triggers-0.3.0.dar
1616
- da-marketplace-exberry-adapter-0.3.0.tar.gz
17-
- da-marketplace-ui-0.3.0-rc.2.zip
17+
- da-marketplace-ui-0.3.0-rc.3.zip

docs/damlhub_deployment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Under the deployments tab, click on "Upload File":
4040

4141
![3_upload_file](https://user-images.githubusercontent.com/71082197/98857330-ec817480-242c-11eb-8b07-4b0f88d3a39f.png)
4242

43-
Upload the packaged `da-marketplace-0.3.0-rc.2.dit` file.
43+
Upload the packaged `da-marketplace-0.3.0-rc.2` file.
4444

4545
Click "Launch" for both the UI and the Model:
4646

@@ -69,7 +69,7 @@ In your marketplace repo:
6969
$ ./scripts/create_ledger_parties.py path/to/participants.json ledger_parties.json
7070

7171
# runs a Daml Script that adds all relevant information to the project ledger
72-
$ daml script --participant-config participants.json --json-api --dar .daml/dist/da-marketplace-0.3.0-rc.2.dar --script-name Setup:doSetup --input-file ledger-parties.json
72+
$ daml script --participant-config participants.json --json-api --dar .daml/dist/da-marketplace-0.3.0 --script-name Setup:doSetup --input-file ledger-parties.json
7373
```
7474

7575
If you would like to boostrap the marketplace with your own data, you can either change the `doSetup` function in `daml/Setup.daml`, or create your own setup function and change the `--script-name` to `MyModule:myFunction`.
@@ -129,6 +129,6 @@ Next, in deployments, click on the Integration and configure it with your Exberr
129129

130130
![13_click_exberry](https://user-images.githubusercontent.com/71082197/98867872-50139e00-243d-11eb-8448-479e46fd85df.png)
131131

132-
Finally, deploy an instance of `da-marketplace-exberry-adapter-0.3.0-rc.2.tar.gz` and launch the automation as `Exchange`.
132+
Finally, deploy an instance of `da-marketplace-exberry-adapter-0.3.0.tar.gz` and launch the automation as `Exchange`.
133133

134134
If you would like to change which `SID` the Exberry adapter begins counting at for the `orderId` calls to Exberry, create a `Marketplace.Utils.ExberrySID` contract as the `Exchange` party _after_ launching the adapter.

docs/local_development.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Alternatively, to only build the DAR file and regenerate the TypeScript bindings
3232

3333
```sh
3434
$ daml build
35-
$ daml codegen js .daml/dist/da-marketplace-0.3.0-rc.2.dar -o daml.js
35+
$ daml codegen js .daml/dist/da-marketplace-0.3.0.dar -o daml.js
3636
$ cd ui
3737
$ yarn install --force --frozen-lockfile
3838
```

scripts/tag-versions.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ docs_damlhub=$9
2828

2929
echo "Retagging versions in all files..."
3030

31+
echo " Tagging dabl-meta.yaml"
32+
if echo "$app_version" | grep -q '-'; then
33+
yq w -i $dabl_meta 'catalog.tags' '[dabl-sample-app, application, experimental]'
34+
else
35+
yq w -i $dabl_meta 'catalog.tags' '[dabl-sample-app, application]'
36+
fi
37+
3138
echo " Tagging daml.yaml"
3239
yq w -i $daml_yaml 'version' "$daml_version"
3340

@@ -49,9 +56,10 @@ sed -ri "s/\"version\": \"$vregex/\"version\": \"$app_version/" $package_json
4956
sed -ri "s/da-marketplace\-$vregex\"/da-marketplace\-$daml_version\"/" $package_json
5057

5158
echo " Tagging docs"
52-
sed -ri "s/da-marketplace\-$vregex/da-marketplace\-$app_version/" $docs_localdev
59+
sed -ri "s/da-marketplace\-$vregex/da-marketplace\-$daml_version/" $docs_localdev
5360

54-
sed -ri "s/da-marketplace\-$vregex/da-marketplace\-$app_version/g" $docs_damlhub
55-
sed -ri "s/da-marketplace-exberry-adapter\-$vregex/da-marketplace-exberry-adapter\-$app_version/" $docs_damlhub
61+
sed -ri "s/da-marketplace\-$vregex.dit/da-marketplace\-$app_version/" $docs_damlhub
62+
sed -ri "s/da-marketplace\-$vregex.dar/da-marketplace\-$daml_version/" $docs_damlhub
63+
sed -ri "s/da-marketplace-exberry-adapter\-$vregex/da-marketplace-exberry-adapter\-$daml_version/" $docs_damlhub
5664

5765
echo "Tagged all files... check results before committing"

scripts/verify-versions.sh

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,19 @@ set -eu
55
# match exactly with the canonical version supplied in `dabl-meta.yaml`
66

77
app_version=$(yq r dabl-meta.yaml 'catalog.version')
8+
9+
# daml.yaml files can't handle full semver versions, keep just the
10+
# MAJOR.MINOR.PATCH fields for them
11+
capture_regex="([0-9]*)\.([0-9]*)\.([0-9]*)(-[a-zA-Z]*\.[0-9]*)?"
12+
short_version=$(echo $app_version | sed -r "s/^$capture_regex/\1.\2.\3/")
13+
14+
echo "Application version is $app_version, short version is $short_version."
15+
816
return_code=0
917

1018
green='\033[0;92m'
1119
red='\033[0;91m'
20+
orange='\033[0;33m'
1221
nc='\033[0m' # No Color
1322

1423
decorate_error () {
@@ -19,47 +28,69 @@ decorate_error () {
1928

2029
printf "Verifying versions match up with app version: ${green}${app_version}${nc}...\n"
2130

22-
daml_version=`cat daml.yaml | grep "$app_version" | wc -l`
31+
if echo "$app_version" | grep -q '-'; then
32+
if cat dabl-meta.yaml | grep -q 'experimental'; then
33+
:
34+
else
35+
decorate_error " Missing the ['experimental'] tag in " dabl-meta.yaml
36+
return_code=1
37+
fi
38+
else
39+
if cat dabl-meta.yaml | grep -q 'experimental'; then
40+
decorate_error " Found an ['experimental'] tag that must be removed in " dabl-meta.yaml
41+
return_code=1
42+
fi
43+
fi
44+
45+
# Escape . characters in the version string
46+
short_version=${short_version//./\\.}
47+
48+
daml_version=`cat daml.yaml | grep "$short_version" | wc -l`
2349
if [[ daml_version -ne 1 ]] ; then
24-
decorate_error "Mismatched version in %s" daml.yaml
50+
decorate_error " Mismatched version in %s" daml.yaml
2551
return_code=1
2652
fi
2753

28-
daml_trigger_version=`cat triggers/daml.yaml | grep $app_version | wc -l`
54+
daml_trigger_version=`cat triggers/daml.yaml | grep $short_version | wc -l`
2955
if [[ daml_trigger_version -ne 2 ]] ; then
30-
decorate_error "Mismatched version(s) in %s" triggers/daml.yaml
56+
decorate_error " Mismatched version(s) in %s" triggers/daml.yaml
3157
return_code=1
3258
fi
3359

34-
daml_it_version=`cat integrationTesting/daml.yaml | grep $app_version | wc -l`
60+
daml_it_version=`cat integrationTesting/daml.yaml | grep $short_version | wc -l`
3561
if [[ daml_it_version -ne 2 ]] ; then
36-
decorate_error "Mismatched version(s) in %s" integrationTest/daml.yaml
62+
decorate_error " Mismatched version(s) in %s" integrationTest/daml.yaml
3763
return_code=1
3864
fi
3965

40-
exberry_adapter_version=`cat exberry_adapter/setup.py | grep "version='$app_version" | wc -l`
66+
exberry_adapter_version=`cat exberry_adapter/setup.py | grep "version='$short_version" | wc -l`
4167
if [[ exberry_adapter_version -ne 1 ]] ; then
42-
decorate_error "Mismatched version in %s" exberry_adapter/setup.py
68+
decorate_error " Mismatched version in %s" exberry_adapter/setup.py
4369
return_code=1
4470
fi
4571

46-
ui_version=`cat ui/package.json | grep $app_version | wc -l`
72+
ui_version=`cat ui/package.json | grep $short_version | wc -l`
4773
if [[ ui_version -ne 2 ]] ; then
48-
decorate_error "Mismatched version(s) in %s" package.json
74+
decorate_error " Mismatched version(s) in %s" package.json
75+
return_code=1
76+
fi
77+
78+
local_docs_version=`cat docs/local_development.md | grep $short_version | wc -l`
79+
if [[ local_docs_version -ne 1 ]] ; then
80+
decorate_error " Mismatched version in %s" docs/local_development.md
4981
return_code=1
5082
fi
5183

52-
docs_version=`cat docs/local_development.md | grep $app_version | wc -l`
53-
if [[ docs_version -ne 1 ]] ; then
54-
decorate_error "Mismatched version in %s" docs/local_development.md
84+
damlhub_docs_version=`cat docs/damlhub_deployment.md | grep $short_version | wc -l`
85+
if [[ damlhub_docs_version -ne 3 ]] ; then
86+
decorate_error " Mismatched version(s) in %s" docs/damlhub_deployment.md
5587
return_code=1
5688
fi
5789

5890
if [[ $return_code -eq 0 ]] ; then
5991
echo "Success: All versions match!"
6092
else
61-
echo "Error: Found mismatching versions :("
62-
echo "Run \`make tag\` to attempt a fix automatically. Commit and push the resulting changes."
93+
printf "\n${orange}Version verification failed :(${nc}\nRun \`${green}make tag${nc}\` to attempt a fix automatically. Commit and push the resulting changes.\n"
6394
fi
6495

6596
exit $return_code

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "da-marketplace-ui",
3-
"version": "0.3.0-rc.2",
3+
"version": "0.3.0-rc.3",
44
"private": true,
55
"dependencies": {
66
"@daml.js/da-marketplace": "file:../daml.js/da-marketplace-0.3.0",

0 commit comments

Comments
 (0)