Skip to content

Commit 61cb23d

Browse files
committed
remove script
1 parent 9fc8472 commit 61cb23d

10 files changed

Lines changed: 0 additions & 54 deletions

src/c#/GeneralUpdate.Core/Bootstrap/GeneralUpdateBootstrap.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ private void InitializeFromEnvironment()
275275
BackupDirectory = processInfo.BackupDirectory,
276276
Scheme = processInfo.Scheme,
277277
Token = processInfo.Token,
278-
Script = processInfo.Script,
279278
DriverDirectory = processInfo.DriverDirectory
280279
};
281280
}

src/c#/GeneralUpdate.Core/Configuration/BaseConfigInfo.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ public abstract class BaseConfigInfo
9090
/// </summary>
9191
public string Token { get; set; }
9292

93-
/// <summary>
94-
/// Shell script content used to grant file permissions on Linux/Unix systems.
95-
/// This script is executed after update to ensure proper file permissions.
96-
/// </summary>
97-
public string Script { get; set; }
98-
9993
/// <summary>
10094
/// The directory path containing driver files for driver update functionality.
10195
/// Used when DriveEnabled is true to locate and install driver files during updates.

src/c#/GeneralUpdate.Core/Configuration/ConfiginfoBuilder.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,6 @@ private static ConfiginfoBuilder LoadFromConfigFile()
112112
builder.SetReportUrl(config.ReportUrl);
113113
if (!string.IsNullOrWhiteSpace(config.Bowl))
114114
builder.SetBowl(config.Bowl);
115-
if (!string.IsNullOrWhiteSpace(config.Script))
116-
builder.SetScript(config.Script);
117115
if (!string.IsNullOrWhiteSpace(config.DriverDirectory))
118116
builder.SetDriverDirectory(config.DriverDirectory);
119117
if (config.BlackFiles != null)
@@ -390,7 +388,6 @@ public Configinfo Build()
390388
UpdateLogUrl = _updateLogUrl,
391389
ReportUrl = _reportUrl,
392390
Bowl = _bowl,
393-
Script = _script,
394391
DriverDirectory = _driverDirectory,
395392
BlackFiles = _blackFiles ?? new List<string>(),
396393
BlackFormats = _blackFormats ?? new List<string>(),

src/c#/GeneralUpdate.Core/Configuration/ConfigurationMapper.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public static GlobalConfigInfo MapToGlobalConfigInfo(Configinfo source, GlobalCo
4242
target.Bowl = source.Bowl;
4343
target.Scheme = source.Scheme;
4444
target.Token = source.Token;
45-
target.Script = source.Script;
4645
target.DriverDirectory = source.DriverDirectory;
4746

4847
// Map GlobalConfigInfo-specific fields
@@ -92,7 +91,6 @@ public static ProcessInfo MapToProcessInfo(
9291
bowl: source.Bowl,
9392
scheme: source.Scheme,
9493
token: source.Token,
95-
script: source.Script,
9694
driverDirectory: source.DriverDirectory, // Driver directory for driver updates
9795
blackFileFormats: blackFileFormats, // From BlackListManager
9896
blackFiles: blackFiles, // From BlackListManager
@@ -128,7 +126,6 @@ public static void CopyBaseFields<TSource, TTarget>(TSource source, TTarget targ
128126
target.Bowl = source.Bowl;
129127
target.Scheme = source.Scheme;
130128
target.Token = source.Token;
131-
target.Script = source.Script;
132129
target.DriverDirectory = source.DriverDirectory;
133130
}
134131
}

src/c#/GeneralUpdate.Core/Configuration/ProcessInfo.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ public ProcessInfo(string appName
6464
, string bowl
6565
, string scheme
6666
, string token
67-
, string script
6867
, string driverDirectory
6968
, List<string> blackFileFormats
7069
, List<string> blackFiles
@@ -99,7 +98,6 @@ public ProcessInfo(string appName
9998
Bowl = bowl;
10099
Scheme = scheme;
101100
Token = token;
102-
Script = script;
103101
DriverDirectory = driverDirectory;
104102

105103
// Set blacklist parameters
@@ -226,13 +224,6 @@ public ProcessInfo(string appName
226224
[JsonPropertyName("SkipDirectorys")]
227225
public List<string> SkipDirectorys { get; set; }
228226

229-
/// <summary>
230-
/// Shell script content for granting file permissions on Linux/Unix systems.
231-
/// Executed after update to ensure updated files have correct permissions.
232-
/// </summary>
233-
[JsonPropertyName("Script")]
234-
public string Script { get; set; }
235-
236227
/// <summary>
237228
/// The directory path containing driver files for driver update functionality.
238229
/// Used when DriveEnabled is true to locate and install driver files.

tests/CoreTest/Bootstrap/BootstrapFullParameterMatrixTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,6 @@ [Fact] public void Chain_ClientAndUpgrade_BothFullyConfigured()
150150
UpdateLogUrl = "https://enterprise.com/releases",
151151
ReportUrl = "https://telemetry.enterprise.com/api/report",
152152
Scheme = "HMAC", Token = "hmac-prod-secret", Bowl = "Bowl.exe",
153-
Script = "#!/bin/bash\nchmod +x /opt/enterprise/Update",
154153
BlackFiles = new List<string> { "*.pdb" },
155154
BlackFormats = new List<string> { ".log", ".tmp" },
156155
SkipDirectorys = new List<string> { "logs", "temp" }

tests/CoreTest/Bootstrap/ClientUpgradeIntegrationTests.cs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.IO;
4-
using System.Linq;
51
using System.Text;
62
using System.Text.Json;
7-
using GeneralUpdate.Core.Download;
8-
using GeneralUpdate.Core.FileSystem;
9-
using GeneralUpdate.Core.Event;
103
using GeneralUpdate.Core.JsonContext;
114
using GeneralUpdate.Core.Configuration;
125
using GeneralUpdate.Core;
13-
using Xunit;
146

157
namespace CoreTest.Bootstrap
168
{
@@ -243,7 +235,6 @@ public void ProcessInfo_FullSerialization_RoundTripPreservesAllFields()
243235
SkipDirectorys = new List<string> { "logs", "cache", "__backups__" },
244236
Scheme = "Bearer",
245237
Token = "jwt-token-xyz",
246-
Script = "#!/bin/bash\nchmod +x",
247238
DriverDirectory = @"C:\drivers"
248239
};
249240

@@ -408,7 +399,6 @@ public void ConfigurationMapper_MapToGlobalConfigInfo_MapsAllFields()
408399
Scheme = "Bearer",
409400
Token = "jwt-token",
410401
Bowl = "Bowl.exe",
411-
Script = "chmod +x /app/Update",
412402
DriverDirectory = @"C:\drivers",
413403
BlackFiles = new List<string> { "*.pdb" },
414404
BlackFormats = new List<string> { ".log" },
@@ -431,7 +421,6 @@ public void ConfigurationMapper_MapToGlobalConfigInfo_MapsAllFields()
431421
Assert.Equal("Bearer", globalConfig.Scheme);
432422
Assert.Equal("jwt-token", globalConfig.Token);
433423
Assert.Equal("Bowl.exe", globalConfig.Bowl);
434-
Assert.Equal("chmod +x /app/Update", globalConfig.Script);
435424
Assert.Equal(@"C:\drivers", globalConfig.DriverDirectory);
436425
Assert.NotNull(globalConfig.BlackFiles);
437426
Assert.Contains("*.pdb", globalConfig.BlackFiles);
@@ -533,7 +522,6 @@ public void DeveloperScenario_FullProductionSetup_CompleteChain()
533522
Scheme = "Bearer",
534523
Token = "eyJhbGciOiJIUzI1NiIs...",
535524
Bowl = "Bowl.exe",
536-
Script = "chmod +x /opt/myproduct/Update",
537525
DriverDirectory = @"C:\Program Files\MyProduct\drivers",
538526
BlackFiles = new List<string> { "*.pdb", "*.config", "appsettings.Development.json" },
539527
BlackFormats = new List<string> { ".log", ".tmp", ".cache" },

tests/CoreTest/Bootstrap/ParameterMatrixAndEventTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ public void Configinfo_FullConfiguration_AllFieldsValid()
503503
Scheme = "HMAC",
504504
Token = "hmac-secret-key",
505505
Bowl = "Bowl.exe",
506-
Script = "#!/bin/bash\nset -e\nchmod +x /opt/app/Update",
507506
DriverDirectory = @"C:\Program Files\EnterpriseApp\drivers",
508507
BlackFiles = new List<string> { "*.pdb", "*.config", "*.Development.json" },
509508
BlackFormats = new List<string> { ".log", ".tmp", ".cache", ".etl" },

tests/CoreTest/Ipc/ProcessInfoProviderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public async Task EncryptedFileProvider_SendReceive_RoundTrips()
3434
bowl: "",
3535
scheme: "",
3636
token: "",
37-
script: "",
3837
driverDirectory: "",
3938
blackFileFormats: new List<string> { ".pdb" },
4039
blackFiles: new List<string> { "test.dll" },

tests/CoreTest/Shared/ConfiginfoBuilderTests.cs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -492,23 +492,6 @@ public void SetBowl_WithValidValue_SetsBowl()
492492
Assert.Equal(bowlProcess, config.Bowl);
493493
}
494494

495-
/// <summary>
496-
/// Tests that SetScript correctly sets the shell script.
497-
/// </summary>
498-
[Fact]
499-
public void SetScript_WithValidValue_SetsScript()
500-
{
501-
// Arrange
502-
var builder = CreateBuilderWithRequiredFields();
503-
var customScript = "#!/bin/bash\necho 'Hello'";
504-
505-
// Act
506-
var config = builder.SetScript(customScript).Build();
507-
508-
// Assert
509-
Assert.Equal(customScript, config.Script);
510-
}
511-
512495
/// <summary>
513496
/// Tests that SetDriverDirectory correctly sets the driver directory.
514497
/// </summary>

0 commit comments

Comments
 (0)