Skip to content

Commit 424bde2

Browse files
committed
release: sqlite 0.4.10 for FDM Monster 1.9.0 with client 1.11.0
1 parent 2d730f6 commit 424bde2

File tree

5 files changed

+110
-106
lines changed

5 files changed

+110
-106
lines changed

.github/workflows/release.yaml

Lines changed: 92 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,31 @@
1-
---
2-
31
name: Release
42
on:
53
push:
64
branches:
7-
- 'release/*'
8-
- 'release-sqlite/*'
5+
- "release/*"
96

107
jobs:
118
release:
12-
if: startsWith(github.ref, 'refs/heads/release')
139
runs-on: ubuntu-latest
1410
steps:
15-
- name: Install Dependencies
16-
run: |
17-
sudo apt update
18-
sudo apt install coreutils p7zip-full qemu-user-static
19-
20-
- name: Checkout CustomPiOS
21-
uses: actions/checkout@v4.2.2
22-
with:
23-
repository: 'guysoft/CustomPiOS'
24-
path: CustomPiOS
25-
ref: "baaa155f33f54fa0e777039dd47cca751fa55802"
26-
27-
- name: Checkout Project Repository
28-
uses: actions/checkout@v4.2.2
29-
with:
30-
path: repository
31-
submodules: true
32-
fetch-depth: 0
11+
- name: Install Dependencies
12+
run: |
13+
sudo apt update
14+
sudo apt install coreutils p7zip-full qemu-user-static
15+
16+
- name: Checkout CustomPiOS
17+
uses: actions/checkout@v4.2.2
18+
with:
19+
repository: "guysoft/CustomPiOS"
20+
path: CustomPiOS
21+
ref: "baaa155f33f54fa0e777039dd47cca751fa55802"
22+
23+
- name: Checkout Project Repository
24+
uses: actions/checkout@v4.2.2
25+
with:
26+
path: repository
27+
submodules: true
28+
fetch-depth: 0
3329

3430
- name: Install GitVersion
3531
uses: gittools/actions/gitversion/setup@v3.2.1
@@ -42,69 +38,76 @@ jobs:
4238
with:
4339
targetPath: repository
4440

45-
- name: Download Raspbian Image
46-
run: |
47-
cd repository/src/image
48-
wget -c --trust-server-names 'https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.5-preinstalled-server-arm64+raspi.img.xz'
49-
50-
- name: Update CustomPiOS Paths
51-
run: |
52-
cd repository/src
53-
../../CustomPiOS/src/update-custompios-paths
54-
55-
- name: Set release image version
56-
run: |
57-
source repository/src/config
58-
echo "DIST_VERSION=${{ steps.gitversion.outputs.majorMinorPatch }}" > repository/src/config.local
59-
60-
- name: Build Image
61-
run: |
62-
sudo modprobe loop
63-
cd repository/src
64-
sudo bash -x ./build_dist
65-
66-
- name: Copy output
67-
id: copy
68-
run: |
69-
source repository/src/config
70-
TAG=${DIST_VERSION}
71-
IMAGE=monsterpi-$TAG
72-
73-
cp repository/src/workspace/*.img $IMAGE.img
74-
75-
echo "tag=$TAG" >> $GITHUB_OUTPUT
76-
echo "image=$IMAGE" >> $GITHUB_OUTPUT
77-
78-
- name: Show size and version info
79-
run: |
80-
echo "Tag ${{steps.copy.outputs.tag}}"
81-
echo "File size of ${{ steps.copy.outputs.image }}.img"
82-
stat --printf="%s" ${{ steps.copy.outputs.image }}.img
83-
84-
- name: Zip Image
85-
run: |
86-
zip ${{ steps.copy.outputs.image }}.zip ${{ steps.copy.outputs.image }}.img
87-
echo "File size of ${{ steps.copy.outputs.image }}.zip"
88-
stat --printf="%s" ${{ steps.copy.outputs.image }}.zip
89-
90-
- name: Create release
91-
uses: actions/create-release@v1
92-
id: create_release
93-
with:
94-
draft: ${{ github.ref_name == 'develop' }}
95-
prerelease: ${{ contains(steps.copy.outputs.tag, 'rc') || contains(steps.copy.outputs.tag, 'unstable') }}
96-
tag_name: ${{ steps.copy.outputs.tag }}
97-
release_name: MonsterPi ${{ steps.copy.outputs.image }}
98-
body: "The MonsterPi image for running FDM Monster on Raspberry Pi. Release notes will be added manually." # ${{ steps.build_changelog.outputs.changelog }}
99-
env:
100-
GITHUB_TOKEN: ${{ github.token }}
101-
102-
- name: Upload server bundle zip
103-
uses: actions/upload-release-asset@v1
104-
env:
105-
GITHUB_TOKEN: ${{ github.token }}
106-
with:
107-
upload_url: ${{ steps.create_release.outputs.upload_url }}
108-
asset_path: ${{ steps.copy.outputs.image }}.zip
109-
asset_name: ${{ steps.copy.outputs.image }}.zip
110-
asset_content_type: application/zip
41+
- name: Determine Release Tag
42+
id: determine_tag
43+
run: |
44+
BRANCH_NAME="${GITHUB_REF#refs/heads/}"
45+
TAG="${{ steps.gitversion.outputs.majorMinorPatch }}-sqlite"
46+
echo "tag=$TAG" >> $GITHUB_OUTPUT
47+
48+
- name: Download Raspbian Image
49+
run: |
50+
cd repository/src/image
51+
wget -c --trust-server-names 'https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.5-preinstalled-server-arm64+raspi.img.xz'
52+
53+
- name: Update CustomPiOS Paths
54+
run: |
55+
cd repository/src
56+
../../CustomPiOS/src/update-custompios-paths
57+
58+
- name: Set release image version
59+
run: |
60+
source repository/src/config
61+
echo "DIST_VERSION=${{ steps.determine_tag.outputs.tag }}" > repository/src/config.local
62+
63+
- name: Build Image
64+
run: |
65+
sudo modprobe loop
66+
cd repository/src
67+
sudo bash -x ./build_dist
68+
69+
- name: Copy output
70+
id: copy
71+
run: |
72+
source repository/src/config
73+
TAG=${{ steps.determine_tag.outputs.tag }}
74+
IMAGE=monsterpi-$TAG
75+
76+
cp repository/src/workspace/*.img $IMAGE.img
77+
78+
echo "tag=$TAG" >> $GITHUB_OUTPUT
79+
echo "image=$IMAGE" >> $GITHUB_OUTPUT
80+
81+
- name: Show size and version info
82+
run: |
83+
echo "Tag ${{steps.copy.outputs.tag}}"
84+
echo "File size of ${{ steps.copy.outputs.image }}.img"
85+
stat --printf="%s" ${{ steps.copy.outputs.image }}.img
86+
87+
- name: Zip Image
88+
run: |
89+
zip ${{ steps.copy.outputs.image }}.zip ${{ steps.copy.outputs.image }}.img
90+
echo "File size of ${{ steps.copy.outputs.image }}.zip"
91+
stat --printf="%s" ${{ steps.copy.outputs.image }}.zip
92+
93+
- name: Create release
94+
uses: actions/create-release@v1
95+
id: create_release
96+
with:
97+
draft: false
98+
prerelease: ${{ contains(steps.copy.outputs.tag, 'rc') || contains(steps.copy.outputs.tag, 'unstable') }}
99+
tag_name: ${{ steps.copy.outputs.tag }}
100+
release_name: MonsterPi ${{ steps.copy.outputs.image }}
101+
body: "The MonsterPi image for running FDM Monster on Raspberry Pi. Release notes will be added manually." # ${{ steps.build_changelog.outputs.changelog }}
102+
env:
103+
GITHUB_TOKEN: ${{ github.token }}
104+
105+
- name: Upload server bundle zip
106+
uses: actions/upload-release-asset@v1
107+
env:
108+
GITHUB_TOKEN: ${{ github.token }}
109+
with:
110+
upload_url: ${{ steps.create_release.outputs.upload_url }}
111+
asset_path: ${{ steps.copy.outputs.image }}.zip
112+
asset_name: ${{ steps.copy.outputs.image }}.zip
113+
asset_content_type: application/zip

src/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export DIST_NAME=MonsterPi
2-
export DIST_VERSION=0.4.8
2+
export DIST_VERSION=0.4.10-sqlite
33
export BASE_DISTRO=ubuntu
44
export BASE_ARCH=aarch64
55
# This does not work without $BASE_IMAGE_PATH

src/modules/monsterpi/config

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
###############################################################################
22
# All our config settings must start with MONSTERPI_
33

4-
# MongoDB
5-
[ -n "$MONSTERPI_MONGODB_VERSION" ] || MONSTERPI_MONGODB_VERSION=4.4
6-
74
# Node.js
85
[ -n "$MONSTERPI_NODEJS_VERSION" ] || MONSTERPI_NODEJS_VERSION=20.x
96

107
# HAProxy
118
[ -n "$MONSTERPI_INCLUDE_HAPROXY" ] || MONSTERPI_INCLUDE_HAPROXY=yes
129

1310
# FDM Monster version
14-
[ -n "$MONSTERPI_FDMMONSTER_VERSION" ] || MONSTERPI_FDMMONSTER_VERSION=1.8.0
11+
[ -n "$MONSTERPI_FDMMONSTER_VERSION" ] || MONSTERPI_FDMMONSTER_VERSION=1.9.0

src/modules/monsterpi/filesystem/home/pi/fdm-monster-daemon/install-fdm-monster.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ const svc = new Service({
1717
script: join(rootPath, "dist/index.js"),
1818
nodeOptions: ["--harmony", "--max_old_space_size=4096"],
1919
workingDirectory: rootPath,
20+
env: [
21+
{
22+
name: "ENABLE_EXPERIMENTAL_TYPEORM",
23+
value: "true",
24+
},
25+
{
26+
name: "DATABASE_PATH",
27+
value: "./database",
28+
},
29+
{
30+
name: "DATABASE_FILE",
31+
value: "fdm-monster.sqlite",
32+
},
33+
],
2034
});
2135

2236
svc.on("install", function () {

src/modules/monsterpi/start_chroot_script

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# start_chroot_script
3-
# This installs MongoDB as well as FDM Monster and HAProxy
3+
# This installs FDM Monster and HAProxy
44
# Written by David Zwart
55
# GPL V3
66
########
@@ -45,7 +45,7 @@ else
4545
fi
4646

4747
# Install GPG
48-
apt install -y gnupg
48+
# apt install -y gnupg
4949

5050
# Install Node.js based on MONSTERPI_NODEJS_VERSION
5151
curl -sL https://deb.nodesource.com/setup_$MONSTERPI_NODEJS_VERSION | bash -
@@ -68,16 +68,6 @@ pushd /home/"${BASE_USER}"
6868
fi
6969
popd
7070

71-
# Add MongoDB as trusted source list
72-
wget -qO - https://www.mongodb.org/static/pgp/server-"$MONSTERPI_MONGODB_VERSION".asc | sudo apt-key add -
73-
echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/`cat /etc/os-release | grep "^ID=" | cut -d "=" -f2` `cat /etc/os-release | grep "^VERSION_CODENAME=" | cut -d "=" -f2`/mongodb-org/$MONSTERPI_MONGODB_VERSION multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-$MONSTERPI_MONGODB_VERSION.list
74-
apt update
75-
76-
# Install MongoDB
77-
sudo apt install -y mongodb-org=4.4.15 mongodb-org-server=4.4.15 mongodb-org-shell=4.4.15 mongodb-org-mongos=4.4.15 mongodb-org-tools=4.4.15
78-
systemctl enable mongod
79-
systemctl start mongod
80-
8171
# add some "How To" info to boot output
8272
# Note, this code is also in /filesystem/home/pi/scripts/
8373
sed -i 's@exit 0@@' /etc/rc.local

0 commit comments

Comments
 (0)