Skip to content

Commit b7ce539

Browse files
committed
[skip py] [autorelease] Export version from JS module.
1 parent 8c3479e commit b7ce539

File tree

11 files changed

+21
-0
lines changed

11 files changed

+21
-0
lines changed

npmjs-common/prepare.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
.replace("__FILENAME__", transpile_file)
4747
.replace("__BASENAME__", os.path.basename(transpile_file)))
4848
package_json["scripts"]["transpile"] = " && ".join(transpile_commands)
49+
package_json["scripts"]["build"] += f" --define:VERSION=\\\"{version}\\\""
4950
if "build" in package_local["scripts"]:
5051
package_json["scripts"]["build"] += " " + package_local["scripts"]["build"]
5152
with open("package.json", "wt") as f:

npmjs-ecp5/lib/api.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ export const commands: {
4141
'ecpunpack': Command,
4242
'nextpnr-ecp5': Command,
4343
};
44+
45+
export const version: string;

npmjs-ecp5/lib/api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ export const commands = {
4545
'ecpunpack': runEcpunpack,
4646
'nextpnr-ecp5': runNextpnrEcp5,
4747
};
48+
49+
export const version = VERSION;

npmjs-himbaechel-gowin/lib/api.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ export const commands: {
3434
'gowin_unpack': Command,
3535
'nextpnr-himbaechel-gowin': Command,
3636
};
37+
38+
export const version: string;

npmjs-himbaechel-gowin/lib/api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,5 @@ export const commands = {
3636
'gowin_unpack': runGowinUnpack,
3737
'nextpnr-himbaechel-gowin': runNextpnrHimbaechelGowin,
3838
};
39+
40+
export const version = VERSION;

npmjs-ice40/lib/api.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ export const commands: {
4141
'iceunpack': Command,
4242
'nextpnr-ice40': Command,
4343
};
44+
45+
export const version: string;

npmjs-ice40/lib/api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,5 @@ export const commands = {
4444
'iceunpack': runIceunpack,
4545
'nextpnr-ice40': runNextpnrIce40,
4646
};
47+
48+
export const version = VERSION;

npmjs-machxo2/lib/api.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ export const commands: {
4141
'ecpunpack': Command,
4242
'nextpnr-machxo2': Command,
4343
};
44+
45+
export const version: string;

npmjs-machxo2/lib/api.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,5 @@ export const commands = {
4545
'ecpunpack': runEcpunpack,
4646
'nextpnr-machxo2': runNextpnrMachxo2,
4747
};
48+
49+
export const version = VERSION;

npmjs-nexus/lib/api.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ export const commands: {
3333
'prjoxide': Command,
3434
'nextpnr-nexus': Command,
3535
};
36+
37+
export const version: string;

0 commit comments

Comments
 (0)