Skip to content

Commit

Permalink
Rolling back the +x bit change in v0.10 (#297)
Browse files Browse the repository at this point in the history
* rolled back +x change because it breaks macos
  • Loading branch information
dylan-smith authored Mar 30, 2022
1 parent f99e9e1 commit 937314c
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 23 deletions.
5 changes: 2 additions & 3 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
- Updates most commands to be idempotent. They will check if there is anything to do, and if not they will print a message to that effect and complete successfully. E.g. create-team will check if the team already exists and if so exit as success (compared to previously where it would crash). The following commands have been updated:
- configure-autolink
- create-team
- Updating commands to be idempotent. They will check if there is anything to do, and if not they will print a message to that effect and complete successfully. E.g. create-team will check if the team already exists and if so exit as success (compared to previously where it would crash). The following commands have been updated:
- disable-ado-repo
- The change to automatically set the +x bit on the generated migration script has been rolled back (introduced in v0.10). We discovered a bug with this that caused `generate-script` to crash on MacOS. We're temporarily rolling this back to unblock customers while we investigate and fix the problem.
8 changes: 0 additions & 8 deletions src/ado2gh/Commands/GenerateScriptCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
using System.CommandLine.Invocation;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Mono.Unix;
using OctoshiftCLI.Extensions;

namespace OctoshiftCLI.AdoToGithub.Commands
Expand Down Expand Up @@ -109,12 +107,6 @@ public async Task Invoke(string githubOrg, string adoOrg, FileInfo output, bool
if (output != null)
{
await File.WriteAllTextAsync(output.FullName, script);
// +x so script can be executed on macos and linux
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
var unixFileInfo = new UnixFileInfo(output.FullName);
unixFileInfo.FileAccessPermissions |= FileAccessPermissions.UserExecute | FileAccessPermissions.GroupExecute | FileAccessPermissions.OtherExecute;
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions src/ado2gh/ado2gh.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.11.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
<PackageReference Include="System.CommandLine.Hosting" Version="0.3.0-alpha.21216.1" />
</ItemGroup>
Expand Down
9 changes: 0 additions & 9 deletions src/gei/Commands/GenerateScriptCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
using System.CommandLine.Invocation;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Mono.Unix;
using OctoshiftCLI.Extensions;

namespace OctoshiftCLI.GithubEnterpriseImporter.Commands
Expand Down Expand Up @@ -165,13 +163,6 @@ await InvokeAdo(adoSourceOrg, githubTargetOrg, sequential) :
if (output != null)
{
await File.WriteAllTextAsync(output.FullName, script);

// +x so script can be executed on macos and linux
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) || RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
{
var unixFileInfo = new UnixFileInfo(output.FullName);
unixFileInfo.FileAccessPermissions |= FileAccessPermissions.UserExecute | FileAccessPermissions.GroupExecute | FileAccessPermissions.OtherExecute;
}
}
}

Expand Down
1 change: 0 additions & 1 deletion src/gei/gei.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.11.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Mono.Posix.NETStandard" Version="1.0.0" />
<PackageReference Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
<PackageReference Include="System.CommandLine.Hosting" Version="0.3.0-alpha.21216.1" />
</ItemGroup>
Expand Down

0 comments on commit 937314c

Please sign in to comment.