Skip to content

Commit e6d190d

Browse files
publish 2.4.3 (#131)
1 parent 0c344ba commit e6d190d

File tree

53 files changed

+1504
-839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1504
-839
lines changed

.circleci/config.yml

Lines changed: 14 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,6 @@ commands:
5050
- /home/circleci/.nix-channels
5151
- /home/circleci/.nix-defexpr
5252
- /home/circleci/.config/nix
53-
setup_python:
54-
description: Set up Python
55-
steps:
56-
- run:
57-
name: setup_python
58-
command: |
59-
set -euo pipefail
60-
. /home/circleci/.nix-profile/etc/profile.d/nix.sh
61-
nix-shell shell.nix \
62-
--pure \
63-
--run bash \<<'EOF'
64-
set -euo pipefail
65-
66-
python3 -m venv .python-env
67-
source .python-env/bin/activate
68-
python -m pip install -r requirements.txt
69-
EOF
7053

7154
jobs:
7255
build_docs:
@@ -77,11 +60,11 @@ jobs:
7760
steps:
7861
- checkout
7962
- setup_nix
80-
- setup_python
8163
- run:
8264
name: build
8365
command: |
8466
set -euo pipefail
67+
8568
. /home/circleci/.nix-profile/etc/profile.d/nix.sh
8669
8770
mkdir -p /tmp/workspace
@@ -92,15 +75,9 @@ jobs:
9275
--keep ARTIFACTORY_PASSWORD \
9376
--run bash \<<'EOF'
9477
set -euo pipefail
95-
source .python-env/bin/activate
96-
PATH="$(pwd)/.python-env/bin:$PATH"
97-
prefix=$(jq -r '.prefix' versions.json)
98-
if [[ ${#prefix} -lt 5 ]]; then
99-
echo "Pushhing to $prefix is not currently supported."
100-
exit 1
101-
fi
102-
bin/build
103-
mv workdir/target/html-docs-*.tar.gz /tmp/workspace/
78+
docs/download.sh
79+
docs/build.sh
80+
mv docs/workdir/target/html-docs-*.tar.gz /tmp/workspace/
10481
EOF
10582
- store_artifacts:
10683
path: /tmp/workspace
@@ -132,16 +109,11 @@ jobs:
132109
--run bash \<<'EOF'
133110
set -euo pipefail
134111
135-
prefix=$(jq -r '.prefix' versions.json)
136-
sdk_version=$(jq -r '.daml' versions.json)
137-
if [[ ${#prefix} -lt 5 ]]; then
138-
echo "Pushhing to $prefix is not currently supported."
139-
exit 1
140-
fi
112+
prefix=$(jq -r '.prefix' LATEST)
113+
sdk_version=$(jq -r '.daml' LATEST)
141114
142115
upload=$(mktemp -d)
143116
tar xf /tmp/workspace/html-docs-$sdk_version.tar.gz -C $upload --strip-components=1
144-
aws s3 rm s3://docs-daml-com/$prefix --recursive --region us-east-1
145117
aws s3 cp $upload s3://docs-daml-com/$prefix --recursive --acl public-read --region us-east-1
146118
aws cloudfront create-invalidation --distribution-id E1U753I56ERH55 --paths "/$prefix/*"
147119
EOF
@@ -154,7 +126,6 @@ jobs:
154126
steps:
155127
- checkout
156128
- setup_nix
157-
- setup_python
158129
- run:
159130
name: push
160131
command: |
@@ -170,8 +141,6 @@ jobs:
170141
--keep AWS_SECRET_ACCESS_KEY \
171142
--run bash \<<'EOF'
172143
set -euo pipefail
173-
source .python-env/bin/activate
174-
PATH="$(pwd)/.python-env/bin:$PATH"
175144
176145
snapshots=$(curl -sf https://docs.daml.com/snapshots.json \
177146
| jq -r '
@@ -220,8 +189,7 @@ jobs:
220189
if curl -Ifs https://docs.daml.com/$version/index.html &> /dev/null
221190
then echo "-> Nothing to do."
222191
elif [ "$version" = "2.0.1-snapshot.20220419.9374.0.44df8f12" ] \
223-
|| [ "$version" = "2.1.0-snapshot.20220411.9707.0.f6fed6ea" ] \
224-
|| [ "$version" = "2.5.0-snapshot.20221010.10736.0.2f453a14" ]
192+
|| [ "$version" = "2.1.0-snapshot.20220411.9707.0.f6fed6ea" ]
225193
then echo "-> Skipping, known broken."
226194
else
227195
echo "-> Getting Canton version"
@@ -235,21 +203,20 @@ jobs:
235203
| grep canton \
236204
| head -1 \
237205
| sed 's/canton-open-source-\(.*\)\.tar\.gz/\1/')
238-
finance=$(git show origin/main:versions.json | jq -r '.daml_finance')
239-
echo "-> Building daml $version with canton $canton & finance $finance."
206+
echo "-> Building daml $version with canton $canton."
240207
jq -n \
241208
--arg daml $version \
242209
--arg canton $canton \
243-
--arg finance $finance \
244-
'{daml: $daml, canton: $canton, prefix: $daml, daml_finance: $finance}' \
245-
> versions.json
210+
'{daml: $daml, canton: $canton, prefix: $daml}' \
211+
> LATEST
246212
247-
bin/clean
248-
bin/build
213+
docs/download.sh
214+
docs/build.sh
249215
upload=$(mktemp -d)
250-
tar xf workdir/target/html-docs-$version.tar.gz -C $upload --strip-components=1
216+
tar xf docs/workdir/target/html-docs-$version.tar.gz -C $upload --strip-components=1
251217
aws s3 cp $upload s3://docs-daml-com/$version --recursive --acl public-read --region us-east-1
252218
aws cloudfront create-invalidation --distribution-id E1U753I56ERH55 --paths "/$version/*"
219+
rm -rf docs/workdir
253220
echo "-> Done."
254221
fi
255222
echo

.envrc

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,4 @@ use nix
22

33
PATH_add bin
44

5-
pyenv=.python-env
6-
7-
if ! [ -d $pyenv ]; then
8-
python3 -m venv $pyenv
9-
fi
10-
11-
source $pyenv/bin/activate
12-
PATH_add $pyenv/bin
13-
14-
python -m pip install -r requirements.txt
15-
165
[[ -f .envrc.private ]] && source_env .envrc.private
17-
18-
watch_file requirements.txt

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
11
.envrc.private
2-
.DS_Store
3-
4-
.python-env
5-
6-
workdir/

LATEST

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"daml": "2.4.3",
3+
"canton": "2.4.3",
4+
"prefix": "2.4.3"
5+
}

0 commit comments

Comments
 (0)