Skip to content

Commit 1f9862b

Browse files
committed
Version
1 parent 4e32aab commit 1f9862b

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
shell: bash
5757
run: mv _build/default/bin/Extract.exe ${{ steps.get_filenames.outputs.exe_name }}
5858

59-
- name: (release only) Upload artifact ${{ steps.get_filenames.outputs.artifact_name }}
59+
- name: (release only) Upload artifact ${{ matrix.os }}
6060
# if: github.event_name != 'pull_request'
6161
uses: actions/upload-artifact@v2
6262
with:

.github/workflows/get_filenames.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
const fs = require("fs");
22
const os = require("os");
33

4-
const packageJson = fs.readFileSync("package.json");
5-
const { version } = JSON.parse(packageJson);
6-
4+
const version = getVersion();
75
const exeName = getExeName();
86
const platform = getPlatformName();
97
const artifactName = `rescript-react-intl-extractor-${version}-${platform}`;
@@ -12,6 +10,13 @@ const artifactName = `rescript-react-intl-extractor-${version}-${platform}`;
1210
console.log(`::set-output name=exe_name::${exeName}`);
1311
console.log(`::set-output name=artifact_name::${artifactName}`);
1412

13+
function getVersion() {
14+
const duneProject = fs.readFileSync("dune-project");
15+
const match = /\(version (.*)\)/.exec(duneProject);
16+
17+
return match[1];
18+
}
19+
1520
function getPlatformName() {
1621
const platform = os.platform();
1722

dune-project

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
(name rescript-react-intl-extractor)
44

5+
(version 0.12.0)
6+
57
(generate_opam_files true)
68

79
(license MIT)

rescript-react-intl-extractor.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3+
version: "0.12.0"
34
synopsis: "Extracts messages for localization from ReScript source files"
45
maintainer: ["Christoph Knittel <ck@cca.io>"]
56
authors: ["Christoph Knittel <ck@cca.io>"]

0 commit comments

Comments
 (0)