Skip to content

Commit

Permalink
Merge pull request #1 from DocBrown101/dev
Browse files Browse the repository at this point in the history
linux build scripts
  • Loading branch information
DocBrown101 authored Jun 29, 2023
2 parents fe47ae6 + 8892475 commit d7de60d
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Ve.Direct.InfluxDB.Collector/CollectorConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public CollectorConfiguration(CommandLineApplication app)
{
this.outputDefinition = app.Option<OutputDefinition>("-o|--output", "Console or Influx", CommandOptionType.SingleValue);
this.interval = app.Option<int>("-i|--interval", "Interval in seconds", CommandOptionType.SingleValue).Accepts(v => v.Range(10, 3600));
this.serialPortName = app.Option<string>("-s", "The name of the port to use. USB VE.Direct cable would be ttyUSB0", CommandOptionType.SingleOrNoValue);
this.serialPortName = app.Option<string>("-p|--port", "The name of the port to use. USB VE.Direct cable would be /dev/ttyUSB0", CommandOptionType.SingleValue);
this.influxDbUrl = app.Option<string>("--influxDbUrl", "The InfluxDb Url", CommandOptionType.SingleValue);
this.influxDbBucket = app.Option<string>("--influxDbBucket", "The InfluxDb Bucket name", CommandOptionType.SingleValue);
this.influxDbOrg = app.Option<string>("--influxDbOrg", "The InfluxDb Org name", CommandOptionType.SingleValue);
Expand Down
2 changes: 1 addition & 1 deletion src/Ve.Direct.InfluxDB.Collector/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static int Main(string[] args)
app.HelpOption();
app.OnExecuteAsync(async cancellationToken =>
{
ConsoleLogger.Init(config.DebugOutput, "2.3.0");
ConsoleLogger.Init(config.DebugOutput, "2.3.5");
ConsoleLogger.Debug($"Current output setting: {config.Output}");

try
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"profiles": {
"Ve.Direct.InfluxDB.Collector": {
"commandName": "Project",
"commandLineArgs": "--debugOutput"
"commandLineArgs": "--port ttyUSB0 --debugOutput"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net472</TargetFramework>
<TargetFrameworks>net472;net6.0;net7.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
12 changes: 12 additions & 0 deletions start-arm-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/sh
dotnet publish ./src/Ve.Direct.InfluxDB.Collector/Ve.Direct.InfluxDB.Collector.csproj \
--runtime linux-arm \
--self-contained false \
-c Release \
-v minimal \
-f net7.0 \
-o ./arm-build \
-p:PublishReadyToRun=false \
-p:PublishSingleFile=true \
-p:CopyOutputSymbolsToPublishDirectory=false \
--nologo
12 changes: 12 additions & 0 deletions start-x64-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#! /bin/sh
dotnet publish ./src/Ve.Direct.InfluxDB.Collector/Ve.Direct.InfluxDB.Collector.csproj \
--runtime linux-x64 \
--self-contained false \
-c Release \
-v minimal \
-f net7.0 \
-o ./x64-build \
-p:PublishReadyToRun=false \
-p:PublishSingleFile=true \
-p:CopyOutputSymbolsToPublishDirectory=false \
--nologo

0 comments on commit d7de60d

Please sign in to comment.