Skip to content

Commit

Permalink
Merge pull request #12 from remcoros/fix/setConfig_dependencies
Browse files Browse the repository at this point in the history
Fix/set config dependencies
  • Loading branch information
remcoros authored Apr 20, 2024
2 parents a6ebd0a + e6cc543 commit ba86199
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/buildService.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
PACKAGE_ID=$(yq -oy ".id" manifest.*)
echo "package_id=$PACKAGE_ID" >> $GITHUB_ENV
shell: bash

- name: Upload .s9pk
uses: actions/upload-artifact@v3
with:
name: ${{ env.package_id }}.s9pk
path: ./${{ env.package_id }}.s9pk
#
# - name: Upload .s9pk
# uses: actions/upload-artifact@v3
# with:
# name: ${{ env.package_id }}.s9pk
# path: ./${{ env.package_id }}.s9pk
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm-d42b46dd-ls51 AS buildstage
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm-d274027d-ls53 AS buildstage

# these are specified in Makefile
ARG ARCH
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-debianbookworm-d42b46dd-ls51 AS buildstage
FROM ghcr.io/linuxserver/baseimage-kasmvnc:arm64v8-debianbookworm-d274027d-ls53 AS buildstage

# these are specified in Makefile
ARG ARCH
Expand Down
5 changes: 5 additions & 0 deletions docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ if [ ! -f /config/.sparrow/config ]; then
chown -R $PUID:$PGID /config/.sparrow
fi

# always overwrite autostart in case we change it
mkdir -p /config/.config/openbox
cp /defaults/autostart /config/.config/openbox/autostart
chown -R abc:abc /config/.config/openbox

# Manage Sparrow settings?
if [ $(yq e '.sparrow.managesettings' /root/data/start9/config.yaml) = "true" ]; then
# private bitcoin/electrum server
Expand Down
2 changes: 1 addition & 1 deletion manifest.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id: sparrow-webtop
title: "Sparrow"
version: 1.8.5.1
version: 1.8.5.2
release-notes: |
* Update to Sparrow 1.8.5 - See [full changelog](https://github.com/sparrowwallet/sparrow/releases/tag/1.8.5)
* Update and pin docker base image to specific debian version
Expand Down
2 changes: 1 addition & 1 deletion scripts/procedures/migrations.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { compat, types as T } from "../deps.ts";

export const migration: T.ExpectedExports.migration = compat.migrations
.fromMapping({}, "1.8.5.1" );
.fromMapping({}, "1.8.5.2" );
10 changes: 6 additions & 4 deletions scripts/procedures/setConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import { compat, types as T } from "../deps.ts";

// Define a custom type for T.Config to include the 'server' property with a 'type' property
interface SparrowConfig extends T.Config {
server?: {
type?: string;
sparrow?: {
server?: {
type?: string;
};
};
}

Expand All @@ -12,8 +14,8 @@ export const setConfig: T.ExpectedExports.setConfig = async (
effects: T.Effects,
newConfig: SparrowConfig,
) => {
const depsBitcoind: { [key: string]: string[] } = newConfig?.server?.type === "bitcoind" ? { "bitcoind": [] } : {};
const depsElectrs: { [key: string]: string[] } = newConfig?.server?.type === "electrs" ? { "electrs": [] } : {};
const depsBitcoind: { [key: string]: string[] } = newConfig?.sparrow?.server?.type === "bitcoind" ? { "bitcoind": [] } : {};
const depsElectrs: { [key: string]: string[] } = newConfig?.sparrow?.server?.type === "electrs" ? { "electrs": [] } : {};

return compat.setConfig(effects, newConfig, {
...depsBitcoind,
Expand Down

0 comments on commit ba86199

Please sign in to comment.