Browse Source

Added version reader and version in name

flabbet 4 years ago
parent
commit
6c61be91b1

+ 1 - 1
Installer/installer-setup-x64-light.iss

@@ -28,7 +28,7 @@ LicenseFile=..\LICENSE
 ; Uncomment the following line to run in non administrative install mode (install for current user only.)
 ; Uncomment the following line to run in non administrative install mode (install for current user only.)
 ;PrivilegesRequired=lowest
 ;PrivilegesRequired=lowest
 OutputDir=Assets\PixiEditor-{#TargetPlatform}
 OutputDir=Assets\PixiEditor-{#TargetPlatform}
-OutputBaseFilename=PixiEditor-setup-{#TargetPlatform}
+OutputBaseFilename=PixiEditor-{#MyAppVersion}-setup-{#TargetPlatform}
 SetupIconFile=..\icon.ico
 SetupIconFile=..\icon.ico
 Compression=lzma
 Compression=lzma
 SolidCompression=yes
 SolidCompression=yes

+ 1 - 1
Installer/installer-setup-x64.iss

@@ -28,7 +28,7 @@ LicenseFile=..\LICENSE
 ; Uncomment the following line to run in non administrative install mode (install for current user only.)
 ; Uncomment the following line to run in non administrative install mode (install for current user only.)
 ;PrivilegesRequired=lowest
 ;PrivilegesRequired=lowest
 OutputDir=Assets\PixiEditor-{#TargetPlatform}
 OutputDir=Assets\PixiEditor-{#TargetPlatform}
-OutputBaseFilename=PixiEditor-setup-{#TargetPlatform}
+OutputBaseFilename=PixiEditor-{#MyAppVersion}-setup-{#TargetPlatform}
 SetupIconFile=..\icon.ico
 SetupIconFile=..\icon.ico
 Compression=lzma
 Compression=lzma
 SolidCompression=yes
 SolidCompression=yes

+ 1 - 1
Installer/installer-setup-x86-light.iss

@@ -28,7 +28,7 @@ LicenseFile=..\LICENSE
 ; Uncomment the following line to run in non administrative install mode (install for current user only.)
 ; Uncomment the following line to run in non administrative install mode (install for current user only.)
 ;PrivilegesRequired=lowest
 ;PrivilegesRequired=lowest
 OutputDir=Assets\PixiEditor-{#TargetPlatform}
 OutputDir=Assets\PixiEditor-{#TargetPlatform}
-OutputBaseFilename=PixiEditor-setup-{#TargetPlatform}
+OutputBaseFilename=PixiEditor-{#MyAppVersion}-setup-{#TargetPlatform}
 SetupIconFile=..\icon.ico
 SetupIconFile=..\icon.ico
 Compression=lzma
 Compression=lzma
 SolidCompression=yes
 SolidCompression=yes

+ 1 - 1
Installer/installer-setup-x86.iss

@@ -28,7 +28,7 @@ LicenseFile=..\LICENSE
 ; Uncomment the following line to run in non administrative install mode (install for current user only.)
 ; Uncomment the following line to run in non administrative install mode (install for current user only.)
 ;PrivilegesRequired=lowest
 ;PrivilegesRequired=lowest
 OutputDir=Assets\PixiEditor-{#TargetPlatform}
 OutputDir=Assets\PixiEditor-{#TargetPlatform}
-OutputBaseFilename=PixiEditor-setup-{#TargetPlatform}
+OutputBaseFilename=PixiEditor-{#MyAppVersion}-setup-{#TargetPlatform}
 SetupIconFile=..\icon.ico
 SetupIconFile=..\icon.ico
 Compression=lzma
 Compression=lzma
 SolidCompression=yes
 SolidCompression=yes

+ 1 - 1
PixiEditor.UpdateModule/UpdateDownloader.cs

@@ -30,7 +30,7 @@ namespace PixiEditor.UpdateModule
 
 
         private static Asset GetMatchingAsset(ReleaseInfo release)
         private static Asset GetMatchingAsset(ReleaseInfo release)
         {
         {
-            string arch = IntPtr.Size == 8 ? "x64" : "x32";
+            string arch = IntPtr.Size == 8 ? "x64" : "x86";
             return release.Assets.First(x => x.ContentType == "application/x-zip-compressed"
             return release.Assets.First(x => x.ContentType == "application/x-zip-compressed"
             && x.Name.Contains(arch));
             && x.Name.Contains(arch));
         }
         }

+ 6 - 0
assemblyVerReader.ps1

@@ -0,0 +1,6 @@
+$assemblyInfoPath = "PixiEditor\Properties\AssemblyInfo.cs"
+
+$contents = [System.IO.File]::ReadAllText($assemblyInfoPath)
+
+$versionString = [RegEx]::Match($contents,"(?:\d+\.\d+\.\d+\.\d+)")
+$env:TagVersion = $versionString

+ 20 - 0
windows-x64-release.yml

@@ -37,6 +37,11 @@ steps:
     arguments: '-o "UpdateInstaller" -r "win-x64" --self-contained=false -p:PublishSingleFile=true -c Release'
     arguments: '-o "UpdateInstaller" -r "win-x64" --self-contained=false -p:PublishSingleFile=true -c Release'
     zipAfterPublish: false
     zipAfterPublish: false
 
 
+- task: PowerShell@2
+  displayName: "Set tag version"
+  inputs:
+    filePath: 'assemblyVerReader.ps1'
+
 - task: DotNetCoreCLI@2
 - task: DotNetCoreCLI@2
   displayName: "Build release PixiEditor Self-contained"
   displayName: "Build release PixiEditor Self-contained"
   inputs:
   inputs:
@@ -75,6 +80,21 @@ steps:
     projects: '**/PixiEditor.csproj'
     projects: '**/PixiEditor.csproj'
     arguments: '-o "Builds\PixiEditor-x64-light" --self-contained=false -r "win-x64" -c Release'
     arguments: '-o "Builds\PixiEditor-x64-light" --self-contained=false -r "win-x64" -c Release'
     zipAfterPublish: false
     zipAfterPublish: false
+    
+- task: ArchiveFiles@2
+  inputs:
+    rootFolderOrFile: 'Builds\PixiEditor-x64-light'
+    includeRootFolder: true
+    archiveType: 'zip'
+    archiveFile: 'PixiEditor.$(TagVersion).x64.zip'
+    replaceExistingArchive: true
+
+- task: PublishPipelineArtifact@1
+  displayName: "Publish zip artifact"
+  inputs:
+    targetPath: '/'
+    artifact: 'PixiEditor.$(TagVersion).x64.zip'
+    publishLocation: 'pipeline'
 
 
 - task: CopyFiles@2
 - task: CopyFiles@2
   displayName: "Copy updater to PixiEditor target dir"
   displayName: "Copy updater to PixiEditor target dir"

+ 15 - 0
windows-x86-release.yml

@@ -76,6 +76,21 @@ steps:
     arguments: '-o "Builds\PixiEditor-x86-light" --self-contained=false -r "win-x86" -c Release'
     arguments: '-o "Builds\PixiEditor-x86-light" --self-contained=false -r "win-x86" -c Release'
     zipAfterPublish: false
     zipAfterPublish: false
 
 
+task: ArchiveFiles@2
+  inputs:
+    rootFolderOrFile: 'Builds\PixiEditor-x86-light'
+    includeRootFolder: true
+    archiveType: 'zip'
+    archiveFile: 'PixiEditor.$(TagVersion).x86.zip'
+    replaceExistingArchive: true
+
+- task: PublishPipelineArtifact@1
+  displayName: "Publish zip artifact"
+  inputs:
+    targetPath: '/'
+    artifact: 'PixiEditor.$(TagVersion).x86.zip'
+    publishLocation: 'pipeline'
+
 - task: CopyFiles@2
 - task: CopyFiles@2
   displayName: "Copy updater to PixiEditor target dir"
   displayName: "Copy updater to PixiEditor target dir"
   inputs:
   inputs: