Skip to content

Commit 2ed4228

Browse files
authored
Merge pull request #20 from Runebase/Abstraction
Abstraction
2 parents 492ff3e + ba9cbc6 commit 2ed4228

File tree

10 files changed

+296
-244
lines changed

10 files changed

+296
-244
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,4 +432,5 @@ __pycache__/
432432
# End of https://www.gitignore.io/api/node,linux,macos,windows,visualstudio,visualstudiocode
433433

434434
cordova/build.json
435-
dist-electron
435+
dist-electron
436+
compiled_files

build.sh

Lines changed: 49 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,60 @@
11
#!/bin/bash
22

3+
set -e
4+
5+
# Check if required commands are available
6+
command_exists() {
7+
command -v "$1" >/dev/null 2>&1
8+
}
9+
10+
for cmd in yarn jq zip cordova electron-builder webpack; do
11+
if ! command_exists "$cmd"; then
12+
echo "Error: $cmd not found. Please install it before running this script."
13+
exit 1
14+
fi
15+
done
16+
17+
# Define version for chrome extension zip
18+
version=$(jq -r .version package.json)
19+
20+
# Clean and prepare directories
321
yarn clean
4-
mkdir dist
22+
mkdir -p dist
523
rm -rf dist-electron/*
624
rm -rf cordova/www/*
25+
rm -rf compiled_files/*
26+
27+
# Run the script to create an empty thunk (assuming it doesn't need special permissions)
728
./scripts/create-empty-thunk.sh
29+
30+
# Build the application with Webpack
831
webpack --progress --config webpack.prod.config.js
32+
33+
# Copy the build output to the Cordova www directory
934
cp -R dist/* cordova/www
35+
36+
# Change to the Cordova directory and build the Android app
1037
cd cordova
1138
cordova build android
12-
cordova build android --release
39+
cordova build android --release --buildConfig=build.json
1340
cd ..
14-
electron-builder --win --linux -c electron-builder-config.js
41+
42+
# Build the Electron app for Windows and Linux
43+
electron-builder --win --linux -c electron-builder-config.js
44+
45+
# Create the zip file for the Chrome extension
46+
zip -r "Runebase-Lite-Wallet-$version.zip" dist/*
47+
48+
# Create a directory for compiled files
49+
compiled_dir="compiled_files"
50+
mkdir -p "$compiled_dir"
51+
52+
# Copy relevant compiled files to the new directory with renamed files
53+
cp -r cordova/platforms/android/app/build/outputs/apk/debug/app-debug.apk "$compiled_dir/Runebase-Lite-Wallet-v$version-debug.apk"
54+
cp -r cordova/platforms/android/app/build/outputs/bundle/release/app-release.aab "$compiled_dir/Runebase-Lite-Wallet-v$version-release.aab"
55+
cp -r dist-electron/*.AppImage "$compiled_dir"
56+
cp -r dist-electron/*.exe "$compiled_dir"
57+
cp "Runebase-Lite-Wallet-$version.zip" "$compiled_dir"
58+
59+
# Display a message indicating where the compiled files are located
60+
echo "Compiled files are in the '$compiled_dir' directory."

compiled_files/.gitkeep

Whitespace-only changes.

cordova/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version='1.0' encoding='utf-8'?>
2-
<widget id="io.runebase.runebaselitewallet" version="1.6.3" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" android-versionCode="163">
2+
<widget id="io.runebase.runebaselitewallet" version="1.6.5" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" android-versionCode="165">
33
<name>Runebase Lite Wallet</name>
44
<description>A lightweight wallet and transaction signing client for the Runebase network</description>
55
<author email="[email protected]" href="https://www.runebase.io">Bago</author>

cordova/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "io.runebase.runebaselitewallet",
33
"displayName": "Runebase Lite Wallet",
4-
"version": "1.6.3",
4+
"version": "1.6.5",
55
"description": "A Runebase Lite Wallet",
66
"main": "index.js",
77
"scripts": {

0 commit comments

Comments
 (0)