mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
remove scripts volume
This commit is contained in:
@@ -107,19 +107,7 @@ pub fn pack(#[context] ctx: SdkContext, #[arg] path: Option<PathBuf>) -> Result<
|
|||||||
})
|
})
|
||||||
.scripts({
|
.scripts({
|
||||||
let mut scripts = tar::Builder::new(Vec::new());
|
let mut scripts = tar::Builder::new(Vec::new());
|
||||||
|
scripts.append_dir_all(script_volume, path.join(manifest.assets.scripts_path()))?;
|
||||||
for (script_volume, _) in manifest
|
|
||||||
.volumes
|
|
||||||
.iter()
|
|
||||||
.filter(|(_, v)| matches!(v, &&Volume::Scripts {}))
|
|
||||||
{
|
|
||||||
scripts.append_dir_all(
|
|
||||||
script_volume,
|
|
||||||
path.join(manifest.assets.scripts_path())
|
|
||||||
.join(script_volume),
|
|
||||||
)?;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::io::Cursor::new(scripts.into_inner()?)
|
std::io::Cursor::new(scripts.into_inner()?)
|
||||||
})
|
})
|
||||||
.build()
|
.build()
|
||||||
|
|||||||
@@ -187,8 +187,6 @@ pub enum Volume {
|
|||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
Assets {},
|
Assets {},
|
||||||
#[serde(rename_all = "kebab-case")]
|
#[serde(rename_all = "kebab-case")]
|
||||||
Scripts {},
|
|
||||||
#[serde(rename_all = "kebab-case")]
|
|
||||||
Pointer {
|
Pointer {
|
||||||
package_id: PackageId,
|
package_id: PackageId,
|
||||||
volume_id: VolumeId,
|
volume_id: VolumeId,
|
||||||
@@ -239,7 +237,6 @@ impl Volume {
|
|||||||
match self {
|
match self {
|
||||||
Volume::Data { .. } => data_dir(&ctx.datadir, pkg_id, volume_id),
|
Volume::Data { .. } => data_dir(&ctx.datadir, pkg_id, volume_id),
|
||||||
Volume::Assets {} => asset_dir(&ctx.datadir, pkg_id, version).join(volume_id),
|
Volume::Assets {} => asset_dir(&ctx.datadir, pkg_id, version).join(volume_id),
|
||||||
Volume::Scripts {} => script_dir(&ctx.datadir, pkg_id, version).join(volume_id),
|
|
||||||
Volume::Pointer {
|
Volume::Pointer {
|
||||||
package_id,
|
package_id,
|
||||||
volume_id,
|
volume_id,
|
||||||
@@ -272,7 +269,6 @@ impl Volume {
|
|||||||
match self {
|
match self {
|
||||||
Volume::Data { readonly } => *readonly,
|
Volume::Data { readonly } => *readonly,
|
||||||
Volume::Assets {} => true,
|
Volume::Assets {} => true,
|
||||||
Volume::Scripts {} => true,
|
|
||||||
Volume::Pointer { readonly, .. } => *readonly,
|
Volume::Pointer { readonly, .. } => *readonly,
|
||||||
Volume::Certificate { .. } => true,
|
Volume::Certificate { .. } => true,
|
||||||
Volume::Backup { readonly } => *readonly,
|
Volume::Backup { readonly } => *readonly,
|
||||||
|
|||||||
Reference in New Issue
Block a user