File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ results
19
19
* .traineddata
20
20
* .traineddata.gz
21
21
settings.json
22
- tmp
22
+ tmp
23
+ /build /
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # # Note:
4
+ # # The Windows build does not work and the Mac build has never been tested.
5
+ # # The Linux build should work.
6
+
7
+ # Extract version from package.json using grep and sed
8
+ VERSION=$( grep ' "version"' package.json | sed -E ' s/.*"version": *"([^"]+)".*/\1/' )
9
+ if [ -z " $VERSION " ]; then
10
+ echo " Failed to extract version from package.json"
11
+ exit 1
12
+ fi
13
+
14
+ # Create build directory
15
+ mkdir -p build
16
+
17
+ # Build for different platforms
18
+ echo " Building for Linux x64..."
19
+ deno compile --allow-sys --allow-read --allow-write --target x86_64-unknown-linux-gnu --output build/scribe-linux-x64 cli/scribe.js
20
+
21
+ echo " Building for macOS x64..."
22
+ deno compile --allow-sys --allow-read --allow-write --target x86_64-apple-darwin --output build/scribe-macos-x64 cli/scribe.js
23
+
24
+ echo " Building for Windows x64..."
25
+ deno compile --allow-sys --allow-read --allow-write --target x86_64-pc-windows-msvc --output build/scribe-windows-x64.exe cli/scribe.js
26
+
27
+ # Create checksums
28
+ cd build
29
+ sha256sum * > checksums.txt
30
+ cd ..
You can’t perform that action at this time.
0 commit comments