Skip to content

Commit 9743edb

Browse files
committed
CI: Read the version numbers from gen_opams.ml
Use a single source for the version numbers
1 parent c236f0e commit 9743edb

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77
pull_request:
88

99
env:
10-
UKVER: "0.18.0"
11-
OCUKVER: "1.0.0"
1210
FCVER: "1.13.1"
1311
# OPAMVERBOSE: 3
1412

@@ -21,6 +19,14 @@ jobs:
2119
steps:
2220
- name: Checkout code
2321
uses: actions/checkout@v4
22+
- name: Read the version number from gen_opams.ml
23+
run: |
24+
printf 'OCUKVER=%s\n' \
25+
"$(awk '/^let version_ocaml_/ {gsub(/"/,"");print $4;}' gen_opams.ml)" \
26+
>> "$GITHUB_ENV"
27+
printf 'UKVER=%s\n' \
28+
"$(awk '/^let version_unikraft/ {gsub(/"/,"");print $4;}' gen_opams.ml)" \
29+
>> "$GITHUB_ENV"
2430
- name: Install OCaml compiler
2531
uses: ocaml/setup-ocaml@v3
2632
with:
@@ -118,6 +124,14 @@ jobs:
118124
steps:
119125
- name: Checkout code
120126
uses: actions/checkout@v4
127+
- name: Read the version number from gen_opams.ml
128+
run: |
129+
printf 'OCUKVER=%s\n' \
130+
"$(awk '/^let version_ocaml_/ {gsub(/"/,"");print $4;}' gen_opams.ml)" \
131+
>> "$GITHUB_ENV"
132+
printf 'UKVER=%s\n' \
133+
"$(awk '/^let version_unikraft/ {gsub(/"/,"");print $4;}' gen_opams.ml)" \
134+
>> "$GITHUB_ENV"
121135
- name: Checkout skeleton code
122136
uses: actions/checkout@v4
123137
with:

0 commit comments

Comments
 (0)