Skip to content

Commit c083d1e

Browse files
committed
Changes to support CI for ASCOM driver
1 parent 9f1f4b3 commit c083d1e

File tree

11 files changed

+122
-5
lines changed

11 files changed

+122
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This work is licensed under the Creative Commons Attribution-No Derivative Works 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/3.0/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
Binary file not shown.

Software/OpenAstroTracker ASCOM/OpenAstroTracker Setup.iss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
; Script generated by the ASCOM Driver Installer Script Generator 6.4.0.0
33
; Generated by writer on 4/23/2020 (UTC)
44
;
5+
#define ApplicationVersion GetFileVersion('.\OpenAstroTracker\bin\Release\ASCOM.OpenAstroTracker.exe')
6+
57
[Setup]
68
AppID={{2c1013c0-1014-47fa-ba24-80bdc1b77bc5}
79
AppName=ASCOM OpenAstroTracker Telescope Driver
8-
AppVerName=ASCOM OpenAstroTracker Telescope Driver 0.2.0.0b
9-
AppVersion=0.2.0.0b
10+
AppVerName=ASCOM OpenAstroTracker Telescope Driver {#ApplicationVersion}
11+
AppVersion={#ApplicationVersion}
1012
AppPublisher=writer <writer@writer.com>
1113
AppPublisherURL=mailto:writer@writer.com
1214
AppSupportURL=https://old.reddit.com/r/OpenAstroTech/
@@ -21,8 +23,8 @@ OutputBaseFilename="OpenAstroTracker Setup"
2123
Compression=lzma
2224
SolidCompression=yes
2325
; Put there by Platform if Driver Installer Support selected
24-
WizardImageFile="C:\Program Files (x86)\ASCOM\Platform 6 Developer Components\Installer Generator\Resources\WizardImage.bmp"
25-
LicenseFile="C:\Program Files (x86)\ASCOM\Platform 6 Developer Components\Installer Generator\Resources\CreativeCommons.txt"
26+
WizardImageFile="Assets\WizardImage.bmp"
27+
LicenseFile="Assets\CreativeCommons.txt"
2628
; {cf}\ASCOM\Uninstall\Telescope folder created by Platform, always
2729
UninstallFilesDir="{cf}\ASCOM\Uninstall\Telescope\OpenAstroTracker"
2830

Software/OpenAstroTracker ASCOM/OpenAstroTracker/OpenAstroTracker.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
3232
<UseApplicationTrust>false</UseApplicationTrust>
3333
<BootstrapperEnabled>true</BootstrapperEnabled>
34+
<NuGetPackageImportStamp>
35+
</NuGetPackageImportStamp>
3436
</PropertyGroup>
3537
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
3638
<DebugSymbols>true</DebugSymbols>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net40" />
4+
<package id="Tools.InnoSetup" version="5.6.1" targetFramework="net40" />
45
</packages>

Software/OpenAstroTracker ASCOM/TelescopeDriver/Driver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public class Telescope : ReferenceCountedObjectBase, ITelescopeV3 {
1818
//
1919
// Driver ID and descriptive string that shows in the Chooser
2020
//
21-
private string Version = "0.2.0.0b";
21+
private string Version => GetType().Assembly.GetName().Version.ToString();
2222
private string _driverId;
2323
private static string driverDescription = "OpenAstroTracker Telescope";
2424

Software/OpenAstroTracker ASCOM/TelescopeDriver/SetupDialogForm.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ public partial class SetupDialogForm : Form {
1111
public SetupDialogForm(ProfileData profile) {
1212
_profile = profile;
1313
InitializeComponent();
14+
15+
Text = $"OpenAstroTracker Setup - {Version}";
1416
}
1517

18+
private string Version => GetType().Assembly.GetName().Version.ToString();
19+
1620
private void OK_Button_Click(System.Object sender, System.EventArgs e) // OK button event handler
1721
{
1822
// Persist new values of user settings to the ASCOM profile

Software/OpenAstroTracker ASCOM/TelescopeDriver/TelescopeDriver.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535
<UseApplicationTrust>false</UseApplicationTrust>
3636
<BootstrapperEnabled>true</BootstrapperEnabled>
3737
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
38+
<NuGetPackageImportStamp>
39+
</NuGetPackageImportStamp>
3840
</PropertyGroup>
3941
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
4042
<DebugSymbols>true</DebugSymbols>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="ASCOM.Platform" version="6.4.2" targetFramework="net40-client" />
4+
<package id="Tools.InnoSetup" version="5.6.1" targetFramework="net40-client" />
45
</packages>
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# .NET Desktop
2+
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
3+
# Add steps that publish symbols, save build artifacts, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
5+
6+
trigger:
7+
- master
8+
9+
pool:
10+
vmImage: 'windows-latest'
11+
12+
variables:
13+
solutionDir: 'Software\OpenAstroTracker ASCOM'
14+
solution: '$(solutionDir)\OpenAstroTracker.sln'
15+
buildPlatform: 'Any CPU'
16+
buildConfiguration: 'Release'
17+
version: '1.0.$(Build.BuildID).0'
18+
19+
steps:
20+
21+
- task: Update AssemblyInfo@1
22+
inputs:
23+
rootFolder: '$(Build.SourcesDirectory)'
24+
filePattern: 'AssemblyInfo.cs'
25+
assemblyVersion: '$(version)'
26+
assemblyFileVersion: '$(version)'
27+
28+
- task: NuGetToolInstaller@1
29+
30+
31+
- task: NuGetCommand@2
32+
inputs:
33+
command: 'restore'
34+
restoreSolution: '$(solutionDir)\OpenAstroTracker\packages.config'
35+
feedsToUse: 'select'
36+
restoreDirectory: 'packages'
37+
38+
- task: NuGetCommand@2
39+
inputs:
40+
command: 'restore'
41+
restoreSolution: '$(solutionDir)\TelescopeDriver\packages.config'
42+
feedsToUse: 'select'
43+
restoreDirectory: 'packages'
44+
45+
46+
- task: VSBuild@1
47+
inputs:
48+
solution: '$(solution)'
49+
platform: '$(buildPlatform)'
50+
configuration: '$(buildConfiguration)'
51+
52+
- task: PowerShell@2
53+
inputs:
54+
targetType: 'inline'
55+
script: '.\OpenAstroTracker\packages\Tools.InnoSetup.5.6.1\tools\ISCC.exe /F"OpenAstroTracker ASCOM-$(version)" ''.\OpenAstroTracker Setup.iss'''
56+
workingDirectory: '$(solutionDir)'
57+
58+
- task: CopyFiles@2
59+
inputs:
60+
SourceFolder: '$(solutionDir)'
61+
Contents: 'OpenAstroTracker ASCOM-$(version).exe'
62+
TargetFolder: '$(Build.ArtifactStagingDirectory)'
63+
64+
- task: VSTest@2
65+
inputs:
66+
platform: '$(buildPlatform)'
67+
configuration: '$(buildConfiguration)'
68+
69+
- task: PublishBuildArtifacts@1
70+
inputs:
71+
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
72+
ArtifactName: 'OpenAstroTracker'
73+
publishLocation: 'Container'
74+
75+
- task: GitHubRelease@1
76+
inputs:
77+
gitHubConnection: 'jwellman80'
78+
repositoryName: 'jwellman80/OpenAstroTracker-ASCOM'
79+
action: 'create'
80+
target: '$(Build.SourceVersion)'
81+
tagSource: 'userSpecifiedTag'
82+
tag: '$(version)'
83+
title: 'OpenAstroTracker ASCOM - $(version)'
84+
releaseNotesFilePath: '$(solutionDir)\OpenAstroTracker\ReadMe.txt'
85+
changeLogCompareToRelease: 'lastFullRelease'
86+
changeLogType: 'commitBased'

0 commit comments

Comments
 (0)