diff --git a/.gitignore b/.gitignore index 384ca2f2..9a908ad2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ Plugin.dll */bin */obj +*/.vs *.suo - diff --git a/BasicNodes/BasicNodes.csproj b/BasicNodes/BasicNodes.csproj index 5eab3a05..7181d918 100644 Binary files a/BasicNodes/BasicNodes.csproj and b/BasicNodes/BasicNodes.csproj differ diff --git a/Builds/BasicNodes.zip b/Builds/BasicNodes.zip new file mode 100644 index 00000000..434d12fc Binary files /dev/null and b/Builds/BasicNodes.zip differ diff --git a/Builds/VideoNodes.zip b/Builds/VideoNodes.zip new file mode 100644 index 00000000..f605461a Binary files /dev/null and b/Builds/VideoNodes.zip differ diff --git a/VideoNodes/VideoNodes.csproj b/VideoNodes/VideoNodes.csproj index 6edd53aa..24f72c93 100644 Binary files a/VideoNodes/VideoNodes.csproj and b/VideoNodes/VideoNodes.csproj differ diff --git a/buildplugins.ps1 b/buildplugins.ps1 new file mode 100644 index 00000000..3381196a --- /dev/null +++ b/buildplugins.ps1 @@ -0,0 +1,43 @@ +Remove-Item Builds -Recurse -ErrorAction SilentlyContinue + +$revision = (git rev-list --count --first-parent HEAD) -join "`n" + + +$json = "[`n" + +Get-ChildItem -Path .\ -Filter *.csproj -Recurse -File -Name | ForEach-Object { + # update version number of builds + (Get-Content $_) ` + -replace '(?<=(Version>([\d]+\.){3}))([\d]+)(?=<)', $revision | + Out-File $_ + + $name = [System.IO.Path]::GetFileNameWithoutExtension($_) + $version = [Regex]::Match((Get-Content $_), "(?<=(Version>))([\d]+\.){3}[\d]+(?=<)").Value + + $json += "`t{`n" + $json += "`t`t""Name"": ""$name"",`n" + $json += "`t`t""Version"": ""$version"",`n" + $json += "`t`t""Package"": ""https://github.com/revenz/FileFlowsPlugins/Builds/" + $name + ".zip?raw=true""`n" + $json += "`t},`n" + + # build an instance for FileFlow local code + dotnet build $_ /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary --output:../FileFlows/Server/Plugins + # build instance to be published to repo + dotnet build $_ /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary --output:Builds/$name + + Remove-Item Builds/$name/Plugin.dll -ErrorAction SilentlyContinue + Remove-Item Builds/$name/*.deps.json -ErrorAction SilentlyContinue + Remove-Item Builds/$name/ref -Recurse -ErrorAction SilentlyContinue + + # zip build + Compress-Archive -Path Builds/$name/* -DestinationPath Builds/$name.zip + Remove-Item Builds/$name -Recurse -ErrorAction SilentlyContinue +} +$json = $json.Substring(0, $json.lastIndexOf(',')) + "`n" +$json += ']'; + +Set-Content -Path 'plugins.json' -Value $json + +Remove-Item ../FileFlows/Server/Plugins/Plugin.dll -ErrorAction SilentlyContinue +Remove-Item ../FileFlows/Server/Plugins/*.deps.json -ErrorAction SilentlyContinue +Remove-Item ../FileFlows/Server/Plugins/ref -Recurse -ErrorAction SilentlyContinue diff --git a/plugins.json b/plugins.json new file mode 100644 index 00000000..9cb8ca36 --- /dev/null +++ b/plugins.json @@ -0,0 +1,12 @@ +[ + { + "Name": "BasicNodes", + "Version": "0.0.1.1", + "Package": "https://github.com/revenz/FileFlowsPlugins/Builds/BasicNodes.zip?raw=true" + }, + { + "Name": "VideoNodes", + "Version": "0.0.1.1", + "Package": "https://github.com/revenz/FileFlowsPlugins/Builds/VideoNodes.zip?raw=true" + } +]