mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
appmgr: only mount binds if installed
also improve build scripts
This commit is contained in:
committed by
Keagan McClelland
parent
424afb3d1c
commit
09f858d28d
@@ -3,6 +3,11 @@
|
||||
set -e
|
||||
shopt -s expand_aliases
|
||||
|
||||
if [ "$0" != "./build-dev.sh" ]; then
|
||||
>&2 echo "Must be run from appmgr directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
alias 'rust-arm-builder'='docker run --rm -it -v "$HOME/.cargo/registry":/root/.cargo/registry -v "$(pwd)":/home/rust/src start9/rust-arm-cross:latest'
|
||||
|
||||
cd ..
|
||||
|
||||
15
appmgr/build-portable.sh
Executable file
15
appmgr/build-portable.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
shopt -s expand_aliases
|
||||
|
||||
if [ "$0" != "./build-portable.sh" ]; then
|
||||
>&2 echo "Must be run from appmgr directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
alias 'rust-musl-builder'='docker run --rm -it -v "$HOME"/.cargo/registry:/root/.cargo/registry -v "$(pwd)":/home/rust/src messense/rust-musl-cross:x86_64-musl'
|
||||
|
||||
cd ..
|
||||
rust-musl-builder sh -c "(cd appmgr && cargo build --release --target=x86_64-unknown-linux-musl --features=portable,production --no-default-features)"
|
||||
cd appmgr
|
||||
@@ -3,6 +3,11 @@
|
||||
set -e
|
||||
shopt -s expand_aliases
|
||||
|
||||
if [ "$0" != "./build-prod.sh" ]; then
|
||||
>&2 echo "Must be run from appmgr directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
alias 'rust-arm-builder'='docker run --rm -it -v "$HOME/.cargo/registry":/root/.cargo/registry -v "$(pwd)":/home/rust/src start9/rust-arm-cross:latest'
|
||||
|
||||
cd ..
|
||||
|
||||
@@ -222,12 +222,19 @@ pub async fn update_binds(dependent_id: &str) -> Result<(), Error> {
|
||||
.into_iter()
|
||||
.filter(|(_, info)| info.mount_public || info.mount_shared)
|
||||
.map(|(id, info)| async {
|
||||
crate::apps::manifest(&id).await.map(|man| (id, info, man))
|
||||
Ok::<_, Error>(if crate::apps::list_info().await?.contains_key(&id) {
|
||||
let man = crate::apps::manifest(&id).await?;
|
||||
Some((id, info, man))
|
||||
} else {
|
||||
None
|
||||
})
|
||||
}),
|
||||
)
|
||||
.await?;
|
||||
// i just have a gut feeling this shouldn't be concurrent
|
||||
for (dependency_id, info, dependency_manifest) in dependency_manifests {
|
||||
for (dependency_id, info, dependency_manifest) in
|
||||
dependency_manifests.into_iter().filter_map(|a| a)
|
||||
{
|
||||
match (dependency_manifest.public, info.mount_public) {
|
||||
(Some(public), true) => {
|
||||
let public_path = Path::new(crate::VOLUMES).join(&dependency_id).join(public);
|
||||
|
||||
Reference in New Issue
Block a user