A Swiss Army knife for developers.
C# blazorcross-platformcsharpdesktopdesktop-appdesktop-applicationdeveloper-toolsextensiblefluentfluent-designlinuxmacosmicasyntax-highlightingtypescriptwindowswindows-10windows-11winui
Updated CI, updated version number updater,
Etienne Baudouxf06d5ef7505d
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex f3313545b..332778aba 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -39,16 +39,6 @@ You can contribute to DevToys app by:# Coding-## Versioning--The application version use the following pattern :--```-year.month.day.buildCountInTheDay-```--Each time that the solution is built in `Release` mode, version number are updated.-## Main architectureDevToys is using [MEF](https://docs.microsoft.com/en-us/dotnet/framework/mef/) as dependency injection framework.diff --git a/ci/azure-pipelines-release.yml b/ci/azure-pipelines-release.ymlnew file mode 100644index 000000000..90fc24fbb--- /dev/null+++ b/ci/azure-pipelines-release.yml@@ -0,0 +1,115 @@+# Universal Windows Platform+# Build a Universal Windows Platform project using Visual Studio.+# Add steps that test and distribute an app, save build artifacts, and more:+# https://aka.ms/yaml++trigger: none+pr: none++pool:+ vmImage: 'windows-latest'++variables:+ group: BuildPipelineVariables+ uwpProject: '**/*.wapproj'+ buildPlatform: 'x86|x64|ARM|ARM64'+ buildConfiguration: 'Release'+ appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'+ certificateSecureFilePath: 'DevToys.Startup.cer'++jobs:+### Sideload release ###+- job: SideloadRelease+ displayName: 'Sideload Release Build'+ timeoutInMinutes: 120+ steps:++ - task: PowerShell@2+ displayName: 'Rename app in appxmanifest'+ inputs:+ targetType: 'inline'+ script: |+ [xml]$xmlDoc = Get-Content $(Build.SourcesDirectory)\src\dev\shared\Package.appxmanifest+ $xmlDoc.Package.Identity.Name="DevToys"+ $xmlDoc.Package.Properties.DisplayName="DevToys"+ $xmlDoc.Package.Applications.Application.VisualElements.DisplayName="DevToys"+ $xmlDoc.Save('$(Build.SourcesDirectory)\src\dev\shared\Package.appxmanifest')+ failOnStderr: true++ - task: DownloadSecureFile@1+ displayName: 'Download certificate'+ name: signingCert+ inputs:+ secureFile: '$(certificateSecureFilePath)'++ # Run the init.ps1, which mostly restores dependencies+ - task: PowerShell@2+ displayName: 'Restore nuget packages'+ inputs:+ filePath: 'init.ps1'+ failOnStderr: true++ # Builds the msixbundle file+ - task: MSBuild@1+ displayName: 'Build Sideload package'+ inputs:+ solution: '$(uwpProject)'+ configuration: '$(buildConfiguration)'+ msbuildArguments: '/t:build+ /p:AppxBundlePlatforms="$(buildPlatform)"+ /p:AppxPackageDir="$(appxPackageDir)"+ /p:AppxBundle=Always+ /p:UapAppxPackageBuildMode=Sideload+ /p:AppxPackageSigningEnabled=true+ /p:PackageCertificateKeyFile="$(signingCert.secureFilePath)"+ /p:PackageCertificatePassword="$(signingCert.password)"+ /p:PackageCertificateThumbprint=""'+ maximumCpuCount: true++ - task: PublishBuildArtifacts@1+ displayName: 'Publish Artifact: drop'+ inputs:+ PathtoPublish: '$(appxPackageDir)'++### Store release ###+- job: StoreRelease+ displayName: 'Store Release Build'+ timeoutInMinutes: 120+ steps:++ - task: PowerShell@2+ displayName: 'Rename app in appxmanifest'+ inputs:+ targetType: 'inline'+ script: |+ [xml]$xmlDoc = Get-Content $(Build.SourcesDirectory)\src\dev\shared\Package.appxmanifest+ $xmlDoc.Package.Identity.Name="64360VelerSoftware.DevToys"+ $xmlDoc.Package.Properties.DisplayName="DevToys"+ $xmlDoc.Package.Applications.Application.VisualElements.DisplayName="DevToys"+ $xmlDoc.Save('$(Build.SourcesDirectory)\src\dev\shared\Package.appxmanifest')+ failOnStderr: true++ # Run the init.ps1, which mostly restores dependencies+ - task: PowerShell@2+ displayName: 'Restore nuget packages'+ inputs:+ filePath: 'init.ps1'+ failOnStderr: true++ # Builds the msixbundle file+ - task: MSBuild@1+ displayName: 'Build Store package'+ inputs:+ solution: '$(uwpProject)'+ configuration: '$(buildConfiguration)'+ msbuildArguments: '/t:build+ /p:AppxBundlePlatforms="$(buildPlatform)"+ /p:AppxPackageDir="$(appxPackageDir)"+ /p:AppxBundle=Always+ /p:UapAppxPackageBuildMode=StoreUpload'+ maximumCpuCount: true++ - task: PublishBuildArtifacts@1+ displayName: 'Publish Artifact: drop'+ inputs:+ PathtoPublish: '$(appxPackageDir)'\ No newline at end of filediff --git a/ci/azure-pipelines.yml b/ci/azure-pipelines.ymlindex b16cf5560..45a43ad37 100644--- a/ci/azure-pipelines.yml+++ b/ci/azure-pipelines.yml@@ -11,16 +11,14 @@ pool:variables:group: BuildPipelineVariables- solution: '**/*.sln'uwpProject: '**/*.wapproj'- testProject: '**/*test*.csproj'buildPlatform: 'x86|x64|ARM|ARM64'buildConfiguration: 'Release'appxPackageDir: '$(build.artifactStagingDirectory)\AppxPackages\\'jobs:- job: Build- timeoutInMinutes: 240+ timeoutInMinutes: 120steps:# Run the init.ps1, which mostly restores dependencies@@ -30,16 +28,21 @@ jobs:filePath: 'init.ps1'failOnStderr: true- # Builds the APPXbundle+ # Builds the msixbundle file- task: MSBuild@1displayName: 'Build UWP AppxBundle'inputs:solution: '$(uwpProject)'configuration: '$(buildConfiguration)'- msbuildArguments: '/t:build /p:AppxBundlePlatforms="$(buildPlatform)" /p:AppxPackageDir="$(appxPackageDir)" /p:AppxPackageSigningEnabled=false /p:AppxBundle=Always /p:UapAppxPackageBuildMode=StoreUpload'+ msbuildArguments: '/t:build+ /p:AppxBundlePlatforms="$(buildPlatform)"+ /p:AppxPackageDir="$(appxPackageDir)"+ /p:AppxPackageSigningEnabled=false+ /p:AppxBundle=Always+ /p:UapAppxPackageBuildMode=StoreUpload'maximumCpuCount: true- task: PublishBuildArtifacts@1displayName: 'Publish Artifact: drop'inputs:- PathtoPublish: '$(build.artifactstagingdirectory)'+ PathtoPublish: '$(appxPackageDir)'diff --git a/src/DevToys.sln b/src/DevToys.slnindex bc6212c2c..7452541d2 100644--- a/src/DevToys.sln+++ b/src/DevToys.sln@@ -30,6 +30,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "SolutionEndProjectProject("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "shared", "shared", "{EE2227BC-954E-4053-AE38-4AE7A391AEEA}"ProjectSection(SolutionItems) = preProject+ dev\shared\Package.appxmanifest = dev\shared\Package.appxmanifestdev\shared\SharedAssemblyInfo.cs = dev\shared\SharedAssemblyInfo.csEndProjectSectionEndProjectdiff --git a/src/dev/DevToys.Startup/DevToys.Startup.wapproj b/src/dev/DevToys.Startup/DevToys.Startup.wapprojindex 7fefaa5a9..279e8eb7f 100644--- a/src/dev/DevToys.Startup/DevToys.Startup.wapproj+++ b/src/dev/DevToys.Startup/DevToys.Startup.wapproj@@ -43,7 +43,6 @@<TargetPlatformVersion>$(Windows10SDKVersion)</TargetPlatformVersion><TargetPlatformMinVersion>$(Windows10MinSDKVersion)</TargetPlatformMinVersion><DefaultLanguage>en</DefaultLanguage>- <AppxPackageSigningEnabled>false</AppxPackageSigningEnabled><GenerateAppInstallerFile>False</GenerateAppInstallerFile><AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision><AppxSymbolPackageEnabled>True</AppxSymbolPackageEnabled>@@ -54,12 +53,10 @@<AppxPackageDir>..\..\..\bin\AppPackages\</AppxPackageDir><AppxBundle>Always</AppxBundle><EntryPointProjectUniqueName>..\impl\DevToys\DevToys.csproj</EntryPointProjectUniqueName>+ <PackageCertificateThumbprint>16634D2E292D2C34945491575696D8E47FE1CA39</PackageCertificateThumbprint>+ <AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>+ <AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm></PropertyGroup>- <ItemGroup>- <AppxManifest Include="Package.appxmanifest">- <SubType>Designer</SubType>- </AppxManifest>- </ItemGroup><ItemGroup><ProjectReference Include="..\impl\DevToys\DevToys.csproj" /></ItemGroup>@@ -114,6 +111,13 @@<Content Include="Assets\Logo\Wide310x150Logo.scale-150.png" /><Content Include="Assets\Logo\Wide310x150Logo.scale-200.png" /><Content Include="Assets\Logo\Wide310x150Logo.scale-400.png" />+ <None Include="Package.StoreAssociation.xml" />+ </ItemGroup>+ <ItemGroup>+ <AppxManifest Include="..\shared\Package.appxmanifest">+ <Link>Package.appxmanifest</Link>+ <SubType>Designer</SubType>+ </AppxManifest></ItemGroup><!-- <ItemGroup><PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$(NuGet_MicrosoftWindowsSDKBuildTools)" PrivateAssets="all" />diff --git a/src/dev/impl/DevToys/DevToys.csproj b/src/dev/impl/DevToys/DevToys.csprojindex d177a9edd..4e3e05904 100644--- a/src/dev/impl/DevToys/DevToys.csproj+++ b/src/dev/impl/DevToys/DevToys.csproj@@ -283,11 +283,6 @@<DependentUpon>TextDiffToolPage.xaml</DependentUpon></Compile></ItemGroup>- <ItemGroup>- <AppxManifest Include="Package.appxmanifest">- <SubType>Designer</SubType>- </AppxManifest>- </ItemGroup><ItemGroup><Content Include="Assets\Icons\Idea.svg" /><Content Include="Assets\CascadiaCode.ttf" />@@ -313,6 +308,10 @@<Generator>MSBuild:Compile</Generator><SubType>Designer</SubType></ApplicationDefinition>+ <AppxManifest Include="..\..\shared\Package.appxmanifest">+ <Link>Package.appxmanifest</Link>+ <SubType>Designer</SubType>+ </AppxManifest><Page Include="Themes\Custom.xaml"><Generator>MSBuild:Compile</Generator><SubType>Designer</SubType>diff --git a/src/dev/impl/DevToys/Package.appxmanifest b/src/dev/impl/DevToys/Package.appxmanifestdeleted file mode 100644index d476d2d50..000000000--- a/src/dev/impl/DevToys/Package.appxmanifest+++ /dev/null@@ -1,49 +0,0 @@-<?xml version="1.0" encoding="utf-8"?>--<Package- xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"- xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"- xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"- IgnorableNamespaces="uap mp">-- <Identity- Name="c12088ee-f979-4809-8039-7851a3aa2b7a"- Publisher="CN=ebaud"- Version="1.0.0.0" />-- <mp:PhoneIdentity PhoneProductId="c12088ee-f979-4809-8039-7851a3aa2b7a" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>-- <Properties>- <DisplayName>DevToys</DisplayName>- <PublisherDisplayName>ebaud</PublisherDisplayName>- <Logo>Assets\Logo\StoreLogo.png</Logo>- </Properties>-- <Dependencies>- <TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />- </Dependencies>-- <Resources>- <Resource Language="x-generate"/>- </Resources>-- <Applications>- <Application Id="App"- Executable="$targetnametoken$.exe"- EntryPoint="DevToys.App">- <uap:VisualElements- DisplayName="DevToys"- Square150x150Logo="Assets\Logo\Square150x150Logo.png"- Square44x44Logo="Assets\Logo\Square44x44Logo.png"- Description="DevToys"- BackgroundColor="transparent">- <uap:DefaultTile Wide310x150Logo="Assets\Logo\Wide310x150Logo.png"/>- <uap:SplashScreen Image="Assets\Logo\SplashScreen.png" />- </uap:VisualElements>- </Application>- </Applications>-- <Capabilities>- <Capability Name="internetClient" />- </Capabilities>-</Package>\ No newline at end of filediff --git a/src/dev/impl/Directory.Build.targets b/src/dev/impl/Directory.Build.targetsindex d6cb86e75..c91a42a06 100644--- a/src/dev/impl/Directory.Build.targets+++ b/src/dev/impl/Directory.Build.targets@@ -2,14 +2,18 @@<!-- Update Assembly Version info on build --><PropertyGroup><SetVersionPath>$(RepoRoot)tools\SetVersionTask.dll</SetVersionPath>+ <AppVersionNumberPath>$(RepoRoot)tools\app-version-number.txt</AppVersionNumberPath>+ <AppVersionNumber>$([System.IO.File]::ReadAllText($(AppVersionNumberPath)))</AppVersionNumber></PropertyGroup><UsingTask TaskName="SetVersion" AssemblyFile="$(SetVersionPath)" /><Target Name="UpdateVersionNumber" Condition="Exists('$(SetVersionPath)') AND '$(Configuration)' == 'Release'"><Message Text="Updating Version..." /><SetVersionFileName="$(RepoRoot)src\dev\shared\SharedAssemblyInfo.cs"- AssemblyVersion="$([System.DateTime]::Now.ToString(yyyy.MM.dd.0))"- AssemblyFileVersion="$([System.DateTime]::Now.ToString(yyyy.MM.dd.0))" />+ Version="$(AppVersionNumber)" />+ <SetVersion+ FileName="$(RepoRoot)src\dev\shared\Package.appxmanifest"+ Version="$(AppVersionNumber)" /></Target><Target Name="BeforeBuild" DependsOnTargets="UpdateVersionNumber"/>diff --git a/src/dev/DevToys.Startup/Package.appxmanifest b/src/dev/shared/Package.appxmanifestsimilarity index 86%rename from src/dev/DevToys.Startup/Package.appxmanifestrename to src/dev/shared/Package.appxmanifestindex bae568237..713a82098 100644--- a/src/dev/DevToys.Startup/Package.appxmanifest+++ b/src/dev/shared/Package.appxmanifest@@ -7,17 +7,18 @@xmlns:desktop4="http://schemas.microsoft.com/appx/manifest/desktop/windows10/4"IgnorableNamespaces="uap mp desktop4">+ <!-- Please DO NOT commit changes on the version number below unless you're about to release a new version of the app on the Store. --><Identity- Name="020c5ec9-262d-4acd-92d0-26ec6e869879"- Publisher="CN=ebaud"- Version="1.0.0.0" />+ Name="DevToysPreview"+ Publisher="CN=3D87C8C2-C6F4-4875-B258-5FEC13B08F81"+ Version="0.0.0.0" /><!-- TODO: maybe we need to remove this when adding runFullTrust capability --><mp:PhoneIdentity PhoneProductId="c12088ee-f979-4809-8039-7851a3aa2b7a" PhonePublisherId="00000000-0000-0000-0000-000000000000"/><Properties>- <DisplayName>DevToys</DisplayName>- <PublisherDisplayName>ebaud</PublisherDisplayName>+ <DisplayName>DevToys - Preview</DisplayName>+ <PublisherDisplayName>etiennebaudoux</PublisherDisplayName><Logo>Assets\Logo\StoreLogo.png</Logo></Properties>@@ -36,8 +37,8 @@EntryPoint="$targetentrypoint$"desktop4:SupportsMultipleInstances="true"><uap:VisualElements- DisplayName="DevToys"- Description="DevToys"+ DisplayName="DevToys - Preview"+ Description="A Swiss-knife for developers."BackgroundColor="transparent"Square150x150Logo="Assets\Logo\Square150x150Logo.png"Square44x44Logo="Assets\Logo\Square44x44Logo.png">diff --git a/src/dev/shared/SharedAssemblyInfo.cs b/src/dev/shared/SharedAssemblyInfo.csindex 8a5580cda..10b703abb 100644--- a/src/dev/shared/SharedAssemblyInfo.cs+++ b/src/dev/shared/SharedAssemblyInfo.cs@@ -34,7 +34,10 @@ using System.Runtime.CompilerServices;// You can specify all the values or you can default the Build and Revision Numbers// by using the '*' as shown below:// [assembly: AssemblyVersion("1.0.*")]-[assembly: AssemblyVersion("2021.09.26.0")]-[assembly: AssemblyFileVersion("2021.09.26.0")]++// Please DO NOT commit changes on the 2 lines below unless+// you're about to release a new version of the app on the Store.+[assembly: AssemblyVersion("0.0.0.0")]+[assembly: AssemblyFileVersion("0.0.0.0")][assembly: InternalsVisibleTo("DevToys.Tests")]diff --git a/tools/README.md b/tools/README.mdindex c351cbf9d..2b4a2491d 100644--- a/tools/README.md+++ b/tools/README.md@@ -1 +1 @@-- SetVersionTask.dll -> https://github.com/markheath/setversiontask\ No newline at end of file+- SetVersionTask.dll -> https://github.com/veler/SetVersionTask\ No newline at end of filediff --git a/tools/SetVersionTask.dll b/tools/SetVersionTask.dllindex f45044024..c23d038aa 100644Binary files a/tools/SetVersionTask.dll and b/tools/SetVersionTask.dll differdiff --git a/tools/app-version-number.txt b/tools/app-version-number.txtnew file mode 100644index 000000000..ef3d8e2a1--- /dev/null+++ b/tools/app-version-number.txt@@ -0,0 +1 @@+0.9.0.0\ No newline at end of file