Skip to content

Commit

Permalink
Merge pull request #485 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
Merge to main for v2.x release
  • Loading branch information
CartBlanche authored Feb 27, 2024
2 parents d90d702 + 6f59831 commit f2b7ca2
Show file tree
Hide file tree
Showing 211 changed files with 3,878 additions and 1,987 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,7 @@ jobs:
- name: Build CLI v2
run: dotnet build -c Release Meadow.CLI/Source/v2/Meadow.CLI.v2.sln

- name: Unit Test CLI v2
run: dotnet test -c Release --no-build --no-restore --filter "FullyQualifiedName~.Unit.Tests" .\Meadow.CLI\Source\v2\Meadow.CLI.v2.sln


39 changes: 22 additions & 17 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Meadow.CLI Packaging
env:
CLI_RELEASE_VERSION: 1.5.0.0
IDE_TOOLS_RELEASE_VERSION: 1.5.0
MEADOW_OS_VERSION: 1.5.0.0
CLI_RELEASE_VERSION_1: 1.9.0.0
CLI_RELEASE_VERSION_2: 2.0.17.0
IDE_TOOLS_RELEASE_VERSION: 1.9.0
MEADOW_OS_VERSION: 1.9.0.0
VS_MAC_2019_VERSION: 8.10
VS_MAC_2022_VERSION: 17.6

Expand Down Expand Up @@ -43,12 +44,13 @@ jobs:
path: Meadow.Units
ref: main

- name: Setup .NET Core SDK 6.0.x & 7.0.x
- name: Setup .NET Core SDK 6.0.x, 7.0.x & 8.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Setup NuGet
uses: NuGet/[email protected]
Expand All @@ -57,23 +59,23 @@ jobs:
name: Update CLI Version Numbers
run: |
$content = Get-Content main/Meadow.CLI/Meadow.CLI.csproj | Out-String
$newcontent = $content -replace '<PackageVersion>.*</PackageVersion>', '<PackageVersion>${{ ENV.CLI_RELEASE_VERSION }}</PackageVersion>'
$newcontent = $content -replace '<PackageVersion>.*</PackageVersion>', '<PackageVersion>${{ ENV.CLI_RELEASE_VERSION_1 }}</PackageVersion>'
$newcontent | Set-Content main/Meadow.CLI/Meadow.CLI.csproj
$content = Get-Content main/Meadow.CLI.Core/Meadow.CLI.Core.csproj | Out-String
$newcontent = $content -replace '<Version>.*</Version>', '<Version>${{ ENV.CLI_RELEASE_VERSION }}</Version>'
$newcontent = $content -replace '<Version>.*</Version>', '<Version>${{ ENV.CLI_RELEASE_VERSION_1 }}</Version>'
$newcontent | Set-Content main/Meadow.CLI.Core/Meadow.CLI.Core.csproj
$content = Get-Content main/Meadow.CLI.Core/Meadow.CLI.Core.6.0.0.csproj | Out-String
$newcontent = $content -replace '<Version>.*</Version>', '<Version>${{ ENV.CLI_RELEASE_VERSION }}</Version>'
$newcontent = $content -replace '<Version>.*</Version>', '<Version>${{ ENV.CLI_RELEASE_VERSION_1 }}</Version>'
$newcontent | Set-Content main/Meadow.CLI.Core/Meadow.CLI.Core.6.0.0.csproj
$content = Get-Content main/Meadow.CLI.Core/Meadow.CLI.Core.VS2019.csproj | Out-String
$newcontent = $content -replace '<Version>.*</Version>', '<Version>${{ ENV.CLI_RELEASE_VERSION }}</Version>'
$newcontent = $content -replace '<Version>.*</Version>', '<Version>${{ ENV.CLI_RELEASE_VERSION_1 }}</Version>'
$newcontent | Set-Content main/Meadow.CLI.Core/Meadow.CLI.Core.VS2019.csproj
$content = Get-Content main/Meadow.CLI.Core/Constants.cs | Out-String
$newcontent = $content -replace 'CLI_VERSION = \".*\";', 'CLI_VERSION = "${{ ENV.CLI_RELEASE_VERSION }}";'
$newcontent = $content -replace 'CLI_VERSION = \".*\";', 'CLI_VERSION = "${{ ENV.CLI_RELEASE_VERSION_1 }}";'
$newcontent | Set-Content main/Meadow.CLI.Core/Constants.cs
- name: Add MSBuild to Path
Expand All @@ -88,7 +90,7 @@ jobs:
- name: Upload nuget Artifacts for internal testing
uses: actions/upload-artifact@v2
with:
name: Meadow.CLI.Classic.nuget.${{ ENV.CLI_RELEASE_VERSION }}
name: Meadow.CLI.Classic.nuget.${{ ENV.CLI_RELEASE_VERSION_1 }}
path: 'main\Meadow.CLI.Classic\bin\Release\*.nupkg'

- name: Restore normal dependencies
Expand All @@ -100,7 +102,7 @@ jobs:
- name: Upload nuget Artifacts for internal testing
uses: actions/upload-artifact@v2
with:
name: Meadow.CLI.nuget.${{ ENV.CLI_RELEASE_VERSION }}
name: Meadow.CLI.nuget.${{ ENV.CLI_RELEASE_VERSION_1 }}
path: 'main\Meadow.CLI\bin\Release\*.nupkg'

- if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
Expand All @@ -117,7 +119,7 @@ jobs:
- name: Upload nuget Artifacts for internal testing
uses: actions/upload-artifact@v2
with:
name: Meadow.CLI.V2.nuget.2.0.0
name: Meadow.CLI.nuget.${{ ENV.CLI_RELEASE_VERSION_2 }}
path: 'main\Source\v2\Meadow.CLI\bin\Release\*.nupkg'

#- if: ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
Expand Down Expand Up @@ -156,9 +158,9 @@ jobs:
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: |
# 5.0.x
# 6.0.x
# 7.0.x
# 8.0.x

# - name: Setup NuGet
# uses: NuGet/[email protected]
Expand Down Expand Up @@ -220,12 +222,13 @@ jobs:
repository: WildernessLabs/VS_Win_Meadow_Extension
path: vs-win

- name: Setup .NET Core SDK 6.0.x & 7.0.x
- name: Setup .NET Core SDK 6.0.x, 7.0.x, 8.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Setup NuGet
uses: NuGet/[email protected]
Expand Down Expand Up @@ -297,9 +300,9 @@ jobs:
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: |
# 5.0.x
# 6.0.x
# 7.0.x
# 8.0.x

# - name: Setup NuGet
# uses: NuGet/[email protected]
Expand Down Expand Up @@ -407,12 +410,13 @@ jobs:
repository: WildernessLabs/VS_Mac_Meadow_Extension
path: vs-mac

- name: Setup .NET Core SDK 6.0.x & 7.0.x
- name: Setup .NET Core SDK 6.0.x, 7.0.x & 8.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Setup NuGet
uses: NuGet/[email protected]
Expand Down Expand Up @@ -517,12 +521,13 @@ jobs:
path: vs-code
submodules: true

- name: Setup .NET Core SDK 6.0.x & 7.0.x
- name: Setup .NET Core SDK 6.0.x, 7.0.x & 8.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Setup Nuget
uses: Nuget/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ PublishScripts/
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
!**/Source/v2/Meadow.Cloud.Client/**/packages/*
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
Expand Down
6 changes: 3 additions & 3 deletions Meadow.CLI.Core/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ namespace Meadow.CLI.Core
{
public static class Constants
{
public const string CLI_VERSION = "1.5.0.0";
public const ushort HCOM_PROTOCOL_PREVIOUS_VERSION_NUMBER = 0x0006;
public const ushort HCOM_PROTOCOL_CURRENT_VERSION_NUMBER = 0x0007; // Used for transmission
public const string CLI_VERSION = "1.9.0.0";
public const ushort HCOM_PROTOCOL_PREVIOUS_VERSION_NUMBER = 0x0007;
public const ushort HCOM_PROTOCOL_CURRENT_VERSION_NUMBER = 0x0008; // Used for transmission
public const string WILDERNESS_LABS_USB_VID = "2E6A";
public const string MEADOW_CLOUD_HOST_CONFIG_NAME = "meadowCloudHost";
}
Expand Down
2 changes: 1 addition & 1 deletion Meadow.CLI.Core/Managers/PackageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private void BuildProject(string projectPath)
{
var proc = new Process();
proc.StartInfo.FileName = "dotnet";
proc.StartInfo.Arguments = $"build {projectPath}";
proc.StartInfo.Arguments = $"build \"{projectPath}\"";

proc.StartInfo.CreateNoWindow = true;
proc.StartInfo.ErrorDialog = false;
Expand Down
2 changes: 1 addition & 1 deletion Meadow.CLI.Core/Meadow.CLI.Core.6.0.0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.5.0.0</Version>
<Version>1.9.0.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Meadow.CLI.Core/Meadow.CLI.Core.Classic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.5.0.0</Version>
<Version>1.9.0.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Meadow.CLI.Core/Meadow.CLI.Core.VS2019.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.5.0.0</Version>
<Version>1.9.0.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Meadow.CLI.Core/Meadow.CLI.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<LangVersion>preview</LangVersion>
<Nullable>enable</Nullable>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<Version>1.5.0.0</Version>
<Version>1.9.0.0</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Meadow.CLI/Meadow.CLI.Classic.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Authors>Peter Moody, Adrian Stevens, Brian Kim, Pete Garafano, Dominique Louis</Authors>
<Company>Wilderness Labs, Inc</Company>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>1.5.0.0</PackageVersion>
<PackageVersion>1.9.0.0</PackageVersion>
<Platforms>AnyCPU</Platforms>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
Expand Down
2 changes: 1 addition & 1 deletion Meadow.CLI/Meadow.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Authors>Peter Moody, Adrian Stevens, Brian Kim, Pete Garafano, Dominique Louis</Authors>
<Company>Wilderness Labs, Inc</Company>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>1.5.0.0</PackageVersion>
<PackageVersion>1.9.0.0</PackageVersion>
<Platforms>AnyCPU</Platforms>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
Expand Down
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,22 @@ meadow firmware download
meadow firmware write
```

### List available Meadow devices

```
meadow list ports
```

You can then specify which port to use for future commands (replace `{port-name}` to your desired device port, such as `COM3` on Windows or `/dev/tty.usbmodem336F336D30361` on macOS).

```
meadow config route {port-name}
```

### Listen for Meadow Console.WriteLine

After configuring a route to the desired Meadow device.

```
meadow listen
```
Expand Down Expand Up @@ -83,5 +98,7 @@ dotnet tool install WildernessLabs.Meadow.CLI --global

If you need to find or clear out any of the OS download files retrieved by Meadow.CLI, they are located in a WildernessLabs folder in the user directory.

macOS: `~/.local/share/WildernessLabs/Firmware/`
Windows: `%LOCALAPPDATA%\WildernessLabs\Firmware`
* Windows: `%LOCALAPPDATA%\WildernessLabs\Firmware`
* macOS
* .NET 8 or newer: `~/Library/Application Support/WildernessLabs/Firmware`
* .NET 7 or earlier: `~/.local/share/WildernessLabs/Firmware/`
40 changes: 0 additions & 40 deletions Source/v2/Meadow.CLI.Core/Meadow.CLI.Core.csproj

This file was deleted.

Loading

0 comments on commit f2b7ca2

Please sign in to comment.