Skip to content

Commit

Permalink
Build and release documentation and script.
Browse files Browse the repository at this point in the history
  • Loading branch information
jefflill committed Oct 18, 2020
1 parent 561beef commit ee405d0
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 4 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -348,3 +348,8 @@ MigrationBackup/

# Ionide (cross platform F# VS Code tools) working folder
.ionide/

#------------------------------------------------------------------------------
# Repo specific settings:

/Build/**
19 changes: 18 additions & 1 deletion Doc/DEVELOPER.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
### Developer Setup Notes

1. *Optional:* Install the [Extensibility Essentials 2019](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ExtensibilityEssentials2019) Visual Studio extension. This includes very useful tools for obtaining command IDs and other things.
1. Install **Visual Studio 2019 Community 16.3+** from [here](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16)

* Select **all workloads** on the first panel
* Click **Individual components**, type *Git* in the search box and select **Git for Windows** and **GitHub extension for Visual Studio**
* Click **Install** (and take a coffee break)
* Install **.NET Core SDK 3.1.301 (Windows .NET Core Installer x64)** from [here](https://dotnet.microsoft.com/download/visual-studio-sdks)
* Apply any pending **Visual Studio updates**
* **Close** Visual Studio and install any updates

2. *Optional:* Install the [Extensibility Essentials 2019](https://marketplace.visualstudio.com/items?itemName=MadsKristensen.ExtensibilityEssentials2019) Visual Studio extension. This includes very useful tools for obtaining command IDs and other things.

3. *Optional:* Configure the build **environment variables** required only for releasing the extension:

* Open **File Explorer**
* Navigate to the directory holding the cloned repository
* **Right-click** on **buildenv.cmd** and then **Run as adminstrator**
* Press ENTER to close the CMD window when the script is finished
* Restart any Visual Studio instances or command windows to pick up the changes.
12 changes: 12 additions & 0 deletions Doc/RELEASE-TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Raspberry Debugger is a Visual Studio extension intended for debugging .NET Core applications remotely on a Raspberry Pi.

## Changes:

**TODO:** Write something here!

### Build Artifacts and SHA512 signatures:

This is is the Raspberry Debugger VSIX package:

> **RaspberryDebugger.vsix:**
> `FILL THIS IN`
29 changes: 26 additions & 3 deletions Doc/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,31 @@

2. Update the release notes in: `ReleaseNotes.rtf` and `source.extension.vsixmanifest`

3. Build and sign the extension??
3. Open the solution, set the build configuration to **RELEASE** and then manually clean and build the solution.

4. Release to GitHub??
4. Run this command to complete the release process, copying the build artifcats to the [$/Build] folder:

5. Release to Visual Studio Marketplace??
`%RDBG_TOOLBIN%\builder.cmd`

5. Create a release branch from **main** named for the release like **release-v1.0** and push it to GitHub.

6. Create a new GitHub release named the same as the new version and set the releast branch to the newly created branch.

7. Copy `RELEASE-TEMPLATE.md` into the release notes and describe the update including any related issues.

8. Attach `$/Build/RaspberryDebugger.vsix** to the the release.

9. Copy/paste the SHA512 from `$/Build/RaspberryDebugger.vsix.sha512.txt** into the release notes.

10. Publish the GitHub release.

11. Commit any changes and push them to GitHub.

12. Switch back to the **main** branch, merge the changes from the release branch and push **main** to GitHub.

------------------------------------------------
$todo(jefflill): Flesh these out:

13. Build and sign the extension??

14. Release to Visual Studio Marketplace??
10 changes: 10 additions & 0 deletions RaspberryDebugger.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "GitHub", "GitHub", "{177F60A0-B1B9-45D1-9CB1-8F06A6ED2AB5}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
buildenv.cmd = buildenv.cmd
LICENSE = LICENSE
README.md = README.md
EndProjectSection
Expand All @@ -17,6 +18,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Doc", "Doc", "{5A14B2C0-0606-433A-AE9C-9E33C7B2BA27}"
ProjectSection(SolutionItems) = preProject
Doc\DEVELOPER.md = Doc\DEVELOPER.md
Doc\RELEASE-TEMPLATE.md = Doc\RELEASE-TEMPLATE.md
Doc\RELEASE.md = Doc\RELEASE.md
EndProjectSection
EndProject
Expand All @@ -25,6 +27,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Images", "Images", "{642CFD
Doc\Images\RaspberryDebugSettings.png = Doc\Images\RaspberryDebugSettings.png
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ToolBin", "ToolBin", "{15A5F928-90D4-421A-850D-8A09842DA012}"
ProjectSection(SolutionItems) = preProject
ToolBin\builder.cmd = ToolBin\builder.cmd
ToolBin\builder.ps1 = ToolBin\builder.ps1
ToolBin\openssl.exe = ToolBin\openssl.exe
ToolBin\PathTool.exe = ToolBin\PathTool.exe
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
Binary file added ToolBin/PathTool.exe
Binary file not shown.
2 changes: 2 additions & 0 deletions ToolBin/builder.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@echo off
powershell -file "%RDBG_TOOLBIN%\builder.ps1" %*
58 changes: 58 additions & 0 deletions ToolBin/builder.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#------------------------------------------------------------------------------
# FILE: builder.ps1
# CONTRIBUTOR: Jeff Lill
# COPYRIGHT: Copyright (c) 2005-2020 by neonFORGE, LLC. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Performs a clean build of the RaspberryDebugger and publishes the binary
# to the [$/build] folder.
#
# USAGE: powershell -file ./builder.ps1

$rdbgRoot = "$env:RDBG_ROOT"
$rdbgBuild = "$env:RDBG_BUILD"
$rdbgTools = "$rdbgRoot\Tools"

# NOTE:
#
# MSBUILD.EXE and DEVENV.EXE don't appear to be capable of actually building thr VSIX.
# MSBUILD fails because an EXE appears to be referenced by the project and DEVENV
# builds the [SdkCatalogChecker] but not the VSIX.
#
# So the VSIX will need to be built manually first.

$originalDir = $pwd
cd $rdbgRoot

# Copy the VSIX package to the build folder.

copy $rdbgRoot\RaspberryDebugger\bin\Release\RaspberryDebugger.vsix $rdbgBuild

# Generate the SHA512 hash.

""
"SHA512: RaspberryDebugger.vsix..."
""

& cat "$rdbgBuild\RaspberryDebugger.vsix" | openssl dgst -sha512 -hex > "$rdbgBuild\RaspberryDebugger.vsix.sha512.txt"

if (-not $?)
{
""
"*** SHA512 generation failed ***"
""
exit 1
}

cd $originalDir
Binary file added ToolBin/openssl.exe
Binary file not shown.
47 changes: 47 additions & 0 deletions buildenv.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
@echo on
REM Configures the environment variables required to build RaspberryDebugger projects.
REM
REM buildenv [ <source folder> ]
REM
REM Note that <source folder> defaults to the folder holding this
REM batch file.
REM
REM This must be [RUN AS ADMINISTRATOR].

REM Default RDBG_ROOT to the folder holding this batch file after stripping
REM off the trailing backslash.

set RDBG_ROOT=%~dp0
set RDBG_ROOT=%RDBG_ROOT:~0,-2%

if not [%1]==[] set RDBG_ROOT=%1

if exist %RDBG_ROOT%\RaspberryDebugger.sln goto goodPath
echo The [%RDBG_ROOT%\RaspberryDebugger.sln] file does not exist. Please pass the path
echo to the RaspberryDebugger solution folder.
goto done

:goodPath

REM Configure the environment variables.

set RDBG_TOOLBIN=%RDBG_ROOT%\ToolBin
set RDBG_BUILD=%RDBG_ROOT%\Build
set RDBG_TEMP=C:\Temp

REM Persist the environment variables.

setx RDBG_ROOT "%RDBG_ROOT%" /M
setx RDBG_TOOLBIN "%RDBG_TOOLBIN%" /M
setx RDBG_BUILD "%RDBG_BUILD%" /M
setx RDBG_TEMP "%RDBG_TEMP%" /M
setx DOTNET_CLI_TELEMETRY_OPTOUT 1 /M

REM Make sure required folders exist.

if not exist "%RDBG_TEMP%" mkdir "%RDBG_TEMP%"
if not exist "%RDBG_TOOLBIN%" mkdir "%RDBG_TOOLBIN%"
if not exist "%RDBG_BUILD%" mkdir "%RDBG_BUILD%"

:done
pause

0 comments on commit ee405d0

Please sign in to comment.