Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various snap fixes #698

Merged
merged 4 commits into from
Nov 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions snap/hooks/configure
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ then
with 'snap restart plume'"
fi

if [ ! -d ${SNAP_DATA}/media ]
then
mkdir ${SNAP_DATA}/media
fi

if [ "${enabled}" = "true" -a ! -e ${SNAP_COMMON}/initial-migrations-run ]
then
cd ${SNAP}
Expand Down
7 changes: 0 additions & 7 deletions snap/hooks/post-refresh
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
#!/bin/sh

db_type=$(snapctl get db.type)

if [ -z "${db_type}" ]
then
exit 0
fi

cd ${SNAP}
exec ./set-environment bin/plm migration run --path ${SNAP_DATA}
3 changes: 2 additions & 1 deletion snap/local/set-environment
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ enabled="$(snapctl get enabled)"
if [ -z "${enabled}" -o "${enabled}" != "true" ]
then
echo "Plume not yet enabled"
exit 1
exit 0
fi

export BASE_URL="$(snapctl get base-url)"
Expand All @@ -24,6 +24,7 @@ ROCKET_ADDRESS="$(snapctl get listen.address)"
ROCKET_PORT="$(snapctl get listen.port)"
export ROCKET_SECRET_KEY="$(cat ${SNAP_COMMON}/rocket-secret-key)"
export SEARCH_INDEX="${SNAP_DATA}/search_index"
export MEDIA_UPLOAD_DIRECTORY="${SNAP_DATA}/media"

cd ${SNAP}
exec $@
5 changes: 3 additions & 2 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: plume
base: core18
version: '0.3.0' # just for humans, typically '1.2+git' or '1.3.2'
adopt-info: plume
Copy link
Contributor

@igalic igalic Nov 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does Snapcraft build nightlies?

summary: Multi-user blogging platform, federated over ActivityPub
description: |
Plume is a federated blogging platform, featuring:
Expand Down Expand Up @@ -34,9 +34,10 @@ parts:
- on arm64,armhf,ppc64el,s390x:
- lld-8
override-build: |
snapcraftctl set-version $(git describe --tags)
export PATH=$PATH:$HOME/.cargo/bin
rustup install stable
cargo +stable install cargo-web
cargo +stable install --force cargo-web

# Only Tier 1 Rust platforms get rust-lld
# On the others (arm64, armhf, powerpc64, s390x) fall back to using
Expand Down