diff --git a/Build/.nuke/build.schema.json b/Build/.nuke/build.schema.json index 87a722c..983f5c6 100644 --- a/Build/.nuke/build.schema.json +++ b/Build/.nuke/build.schema.json @@ -1,67 +1,155 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "$ref": "#/definitions/build", - "title": "Build Schema", "definitions": { - "build": { + "Host": { + "type": "string", + "enum": [ + "AppVeyor", + "AzurePipelines", + "Bamboo", + "Bitbucket", + "Bitrise", + "GitHubActions", + "GitLab", + "Jenkins", + "Rider", + "SpaceAutomation", + "TeamCity", + "Terminal", + "TravisCI", + "VisualStudio", + "VSCode" + ] + }, + "IssConfiguration": { "type": "object", "properties": { - "ApplicationType": { - "type": "string" + "Title": { + "type": [ + "null", + "string" + ] }, - "Continue": { - "type": "boolean", - "description": "Indicates to continue a previously failed build attempt" + "Image": { + "type": [ + "null", + "string" + ] }, - "Folder": { - "type": "string" + "ImageSmall": { + "type": [ + "null", + "string" + ] }, - "GitHubToken": { - "type": "string", - "default": "Secrets must be entered via 'nuke :secrets [profile]'" + "Icon": { + "type": [ + "null", + "string" + ] }, - "Help": { - "type": "boolean", - "description": "Shows the help text for this build assembly" + "Licence": { + "type": [ + "null", + "string" + ] }, - "Host": { - "type": "string", - "description": "Host for execution. Default is 'automatic'", - "enum": [ - "AppVeyor", - "AzurePipelines", - "Bamboo", - "Bitbucket", - "Bitrise", - "GitHubActions", - "GitLab", - "Jenkins", - "Rider", - "SpaceAutomation", - "TeamCity", - "Terminal", - "TravisCI", - "VisualStudio", - "VSCode" + "Language": { + "oneOf": [ + { + "type": "null" + }, + { + "$ref": "#/definitions/IssLanguage" + } ] }, - "InstallationFiles": { - "type": "string" + "IssLanguageLicences": { + "type": [ + "array", + "null" + ], + "items": { + "$ref": "#/definitions/IssLanguageLicence" + } + } + } + }, + "IssLanguage": { + "type": "object", + "properties": { + "Name": { + "type": [ + "null", + "string" + ] }, - "IssConfiguration": { - "type": "string" + "MessagesFile": { + "type": [ + "null", + "string" + ] + } + } + }, + "IssLanguageLicence": { + "type": "object", + "properties": { + "Name": { + "type": [ + "null", + "string" + ] }, - "MainName": { - "type": "string" + "MessagesFile": { + "type": [ + "null", + "string" + ] }, - "MiddleVersions": { - "type": "boolean" + "Licence": { + "type": [ + "null", + "string" + ] + } + } + }, + "ExecutableTarget": { + "type": "string", + "enum": [ + "Build", + "Clean", + "Compile", + "GitRelease", + "PackageBuilder", + "Release", + "Sign" + ] + }, + "Verbosity": { + "type": "string", + "description": "", + "enum": [ + "Verbose", + "Normal", + "Minimal", + "Quiet" + ] + }, + "NukeBuild": { + "properties": { + "Continue": { + "type": "boolean", + "description": "Indicates to continue a previously failed build attempt" }, - "Name": { - "type": "string" + "Help": { + "type": "boolean", + "description": "Shows the help text for this build assembly" }, - "NewVersions": { - "type": "boolean" + "Host": { + "description": "Host for execution. Default is 'automatic'", + "$ref": "#/definitions/Host" }, "NoLogo": { "type": "boolean", @@ -82,6 +170,65 @@ "type": "string" } }, + "Root": { + "type": "string", + "description": "Root directory during build execution" + }, + "Skip": { + "type": "array", + "description": "List of targets to be skipped. Empty list skips all dependencies", + "items": { + "$ref": "#/definitions/ExecutableTarget" + } + }, + "Target": { + "type": "array", + "description": "List of targets to be invoked. Default is '{default_target}'", + "items": { + "$ref": "#/definitions/ExecutableTarget" + } + }, + "Verbosity": { + "description": "Logging verbosity during build execution. Default is 'Normal'", + "$ref": "#/definitions/Verbosity" + } + } + } + }, + "allOf": [ + { + "properties": { + "ApplicationType": { + "type": "string" + }, + "EnableForkedRepository": { + "type": "boolean" + }, + "Folder": { + "type": "string" + }, + "GitHubToken": { + "type": "string", + "default": "Secrets must be entered via 'nuke :secrets [profile]'" + }, + "InstallationFiles": { + "type": "string" + }, + "IssConfiguration": { + "$ref": "#/definitions/IssConfiguration" + }, + "MainName": { + "type": "string" + }, + "MiddleVersions": { + "type": "boolean" + }, + "Name": { + "type": "string" + }, + "NewVersions": { + "type": "boolean" + }, "ProjectNameFolder": { "type": "boolean" }, @@ -103,10 +250,6 @@ "ReleasePackageBuilder": { "type": "boolean" }, - "Root": { - "type": "string", - "description": "Root directory during build execution" - }, "SignFile": { "type": "string", "default": "Secrets must be entered via 'nuke :secrets [profile]'" @@ -115,59 +258,20 @@ "type": "string", "default": "Secrets must be entered via 'nuke :secrets [profile]'" }, - "Skip": { - "type": "array", - "description": "List of targets to be skipped. Empty list skips all dependencies", - "items": { - "type": "string", - "enum": [ - "Build", - "Clean", - "Compile", - "GitRelease", - "PackageBuilder", - "Release", - "Sign" - ] - } - }, "Solution": { "type": "string", "description": "Path to a solution file that is automatically loaded" }, - "Target": { - "type": "array", - "description": "List of targets to be invoked. Default is '{default_target}'", - "items": { - "type": "string", - "enum": [ - "Build", - "Clean", - "Compile", - "GitRelease", - "PackageBuilder", - "Release", - "Sign" - ] - } - }, "VendorDescription": { "type": "string" }, "VendorId": { "type": "string" - }, - "Verbosity": { - "type": "string", - "description": "Logging verbosity during build execution. Default is 'Normal'", - "enum": [ - "Minimal", - "Normal", - "Quiet", - "Verbose" - ] } } + }, + { + "$ref": "#/definitions/NukeBuild" } - } + ] } diff --git a/Build/Build.cs b/Build/Build.cs index a26ecc4..39a31fd 100644 --- a/Build/Build.cs +++ b/Build/Build.cs @@ -3,7 +3,7 @@ using ricaun.Nuke; using ricaun.Nuke.Components; -class Build : NukeBuild, IPublishRevit +class Build : NukeBuild, IPublishRevit, IGitPreRelease { string IHazRevitPackageBuilder.Application => "Revit.App"; public static int Main() => Execute(x => x.From().Build); diff --git a/Build/Build.csproj b/Build/Build.csproj index 459bd84..45dd47b 100644 --- a/Build/Build.csproj +++ b/Build/Build.csproj @@ -10,7 +10,7 @@ - + diff --git a/Build/build.ps1 b/Build/build.ps1 index 9583582..d569439 100644 --- a/Build/build.ps1 +++ b/Build/build.ps1 @@ -18,7 +18,7 @@ $TempDirectory = "$PSScriptRoot\\.nuke\temp" $DotNetGlobalFile = "$PSScriptRoot\\global.json" $DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1" -$DotNetChannel = "Current" +$DotNetChannel = "LTS" $env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1 $env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 diff --git a/Build/build.sh b/Build/build.sh index c6d1be3..26f0b25 100644 --- a/Build/build.sh +++ b/Build/build.sh @@ -14,7 +14,7 @@ TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp" DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh" -DOTNET_CHANNEL="Current" +DOTNET_CHANNEL="LTS" export DOTNET_CLI_TELEMETRY_OPTOUT=1 export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1 diff --git a/CHANGELOG.md b/CHANGELOG.md index a38676a..63dbe4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [1.3.0] / 2025-01-21 +### Features +- Support `net10` for Revit 2027. +- AutoUpdate bundle using `ricaun.Revit.Github` package. +### Updates +- Add `BundleGithubUpdater` to auto update bundle from GitHub releases. + ## [1.2.2] / 2024-11-21 - Update icons to `.tiff`. - Update `ricaun.Revit.UI` to version `0.7.1` to support `.tiff` images. @@ -26,7 +33,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - First Release [vNext]: ../../compare/1.0.0...HEAD - +[1.3.0]: ../../compare/1.2.2...1.3.0 [1.2.2]: ../../compare/1.2.1...1.2.2 [1.2.1]: ../../compare/1.2.0...1.2.1 [1.2.0]: ../../compare/1.1.0...1.2.0 diff --git a/Directory.Build.props b/Directory.Build.props new file mode 100644 index 0000000..752e022 --- /dev/null +++ b/Directory.Build.props @@ -0,0 +1,5 @@ + + + 1.3.0 + + \ No newline at end of file diff --git a/README.md b/README.md index ca307d8..56d5837 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,20 @@ # RevitAddin.VisualStudioDebug -[![Revit 2017](https://img.shields.io/badge/Revit-2017+-blue.svg)](../..) -[![Visual Studio 2022](https://img.shields.io/badge/Visual%20Studio-2022-blue)](../..) +[![Revit 2017](https://img.shields.io/badge/Revit-2017+-blue.svg)](https://github.com/ricaun-io/RevitAddin.VisualStudioDebug) +[![Visual Studio 2022](https://img.shields.io/badge/Visual%20Studio-2022-blue)](https://github.com/ricaun-io/RevitAddin.VisualStudioDebug) [![Nuke](https://img.shields.io/badge/Nuke-Build-blue)](https://nuke.build/) [![License MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE) -[![Build](../../actions/workflows/Build.yml/badge.svg)](../../actions) +[![Build](https://github.com/ricaun-io/RevitAddin.VisualStudioDebug/actions/workflows/Build.yml/badge.svg)](https://github.com/ricaun-io/RevitAddin.VisualStudioDebug/actions) The `RevitAddin.VisualStudioDebug` plugin allow to enable debug in the current section of Revit and Visual Studio. This project was generated by the [ricaun.AppLoader](https://ricaun.com/AppLoader/) Revit plugin. +## Features + +* Start / Stop Debugging using Visual Studio process. +* AutoUpdate plugin using [ricaun.Revit.Github](https://github.com/ricaun-io/ricaun.Revit.Github). + ## Usage In the `Add-Ins` tab the panel `Debug` is created with three buttons `Start`, `Event`, and `Stop`. @@ -24,7 +29,10 @@ In the `Add-Ins` tab the panel `Debug` is created with three buttons `Start`, `E ## Installation -* Download and install [RevitAddin.VisualStudioDebug.exe](../../releases/latest/download/RevitAddin.VisualStudioDebug.zip) +Install bundle using the installer [RevitAddin.VisualStudioDebug.exe](https://github.com/ricaun-io/RevitAddin.VisualStudioDebug/releases/latest/download/RevitAddin.VisualStudioDebug.zip) or using [AppBundleTool](https://github.com/ricaun-io/ricaun.AppBundleTool) with the following command: +```shell +AppBundleTool -a https://github.com/ricaun-io/RevitAddin.VisualStudioDebug/releases/latest/download/RevitAddin.VisualStudioDebug.bundle.zip -i +``` ## License @@ -32,4 +40,4 @@ This project is [licensed](LICENSE) under the [MIT License](https://en.wikipedia --- -Do you like this project? Please [star this project on GitHub](../../stargazers)! \ No newline at end of file +Do you like this project? Please [star this project on GitHub](https://github.com/ricaun-io/RevitAddin.VisualStudioDebug/stargazers)! \ No newline at end of file diff --git a/RevitAddin.VisualStudioDebug.sln b/RevitAddin.VisualStudioDebug.sln index e745682..5f05dc4 100644 --- a/RevitAddin.VisualStudioDebug.sln +++ b/RevitAddin.VisualStudioDebug.sln @@ -1,15 +1,16 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29613.14 +# Visual Studio Version 18 +VisualStudioVersion = 18.2.11415.280 d18.0 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{E5013FE9-7EB6-40DC-804C-7207ED298FCC}") = "RevitAddin.VisualStudioDebug", "RevitAddin.VisualStudioDebug\RevitAddin.VisualStudioDebug.csproj", "{C917B240-4C2B-431A-BB03-730BE9802F25}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RevitAddin.VisualStudioDebug", "RevitAddin.VisualStudioDebug\RevitAddin.VisualStudioDebug.csproj", "{C917B240-4C2B-431A-BB03-730BE9802F25}" EndProject -Project("{E5013FE9-7EB6-40DC-804C-7207ED298FCC}") = "Build", "Build\Build.csproj", "{170615F1-1644-459A-BCA7-264A86D7A4F3}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Build", "Build\Build.csproj", "{170615F1-1644-459A-BCA7-264A86D7A4F3}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{29943FE0-2027-4FB7-8B51-0F185DC51C3D}" ProjectSection(SolutionItems) = preProject CHANGELOG.md = CHANGELOG.md + Directory.Build.props = Directory.Build.props LICENSE = LICENSE README.md = README.md EndProjectSection diff --git a/RevitAddin.VisualStudioDebug/Revit/App.cs b/RevitAddin.VisualStudioDebug/Revit/App.cs index b8f61ad..e94d066 100644 --- a/RevitAddin.VisualStudioDebug/Revit/App.cs +++ b/RevitAddin.VisualStudioDebug/Revit/App.cs @@ -52,6 +52,8 @@ public Result OnStartup(UIControlledApplication application) AppDomain.CurrentDomain.AssemblyLoad += CurrentDomain_AssemblyLoad; + BundleGithubUpdater.RunUpdate(); + return Result.Succeeded; } diff --git a/RevitAddin.VisualStudioDebug/Revit/BundleGithubUpdater.cs b/RevitAddin.VisualStudioDebug/Revit/BundleGithubUpdater.cs new file mode 100644 index 0000000..e549c74 --- /dev/null +++ b/RevitAddin.VisualStudioDebug/Revit/BundleGithubUpdater.cs @@ -0,0 +1,39 @@ +using ricaun.Revit.Github; +using System; +using System.Threading.Tasks; + +namespace RevitAddin.VisualStudioDebug.Revit +{ + public static class BundleGithubUpdater + { + private const string RepoOwner = "ricaun-io"; + private const string RepoName = "RevitAddin.VisualStudioDebug"; + private static string RepoUrl => $"https://github.com/{RepoOwner}/{RepoName}"; + + public static void RunUpdate() + { + Task.Run(async () => + { + var service = new GithubRequestService(RepoOwner, RepoName); + bool downloadedNewVersion = await service.Initialize(); + if (downloadedNewVersion) + { + ShowBalloon("Download New Release!", null, RepoUrl); + Console.WriteLine($"RevitAddin.VisualStudioDebug: {downloadedNewVersion}"); + } + }); + } + + private static void ShowBalloon(string title, string category = null, string uriString = null) + { + if (title == null) return; + Autodesk.Internal.InfoCenter.ResultItem ri = new Autodesk.Internal.InfoCenter.ResultItem(); + ri.Category = category ?? typeof(BundleGithubUpdater).Assembly.GetName().Name; + ri.Title = title.Trim(); + if (Uri.TryCreate(uriString, UriKind.RelativeOrAbsolute, out Uri uri)) + ri.Uri = uri; + Autodesk.Windows.ComponentManager.InfoCenterPaletteManager.ShowBalloon(ri); + } + } + +} \ No newline at end of file diff --git a/RevitAddin.VisualStudioDebug/RevitAddin.VisualStudioDebug.csproj b/RevitAddin.VisualStudioDebug/RevitAddin.VisualStudioDebug.csproj index 328b568..cc1e557 100644 --- a/RevitAddin.VisualStudioDebug/RevitAddin.VisualStudioDebug.csproj +++ b/RevitAddin.VisualStudioDebug/RevitAddin.VisualStudioDebug.csproj @@ -22,7 +22,7 @@ - net46;net47;net48;net8.0-windows + net46;net47;net48;net8.0-windows;net10.0-windows @@ -40,6 +40,16 @@ 2021 + + + 2025 + + + + + 2027 + + 2025 @@ -73,7 +83,6 @@ RevitAddin.VisualStudioDebug - 1.2.2 {C917B240-4C2B-431A-BB03-730BE9802F25} @@ -126,8 +135,11 @@ - + + + NU1903 + @@ -151,18 +163,6 @@ - - - - - - - - - - - -