aboutsummaryrefslogtreecommitdiff
path: root/back-end
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2023-08-10 22:08:54 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2023-08-10 22:08:54 -0400
commit277dd634e169e7341272e304f715a542047396d7 (patch)
tree66c07a3605e8c8762007ac34233cd73655162a38 /back-end
parent7cb2e971e43df248d8eed585e4a96d79492e4e79 (diff)
Introduce builds using vnbuild for the websitev0.1.1
Diffstat (limited to 'back-end')
-rw-r--r--back-end/Taskfile.yaml48
-rw-r--r--back-end/src/CMNext.sample.json44
-rw-r--r--back-end/src/Content.Publishing.Blog.Admin.csproj3
3 files changed, 94 insertions, 1 deletions
diff --git a/back-end/Taskfile.yaml b/back-end/Taskfile.yaml
new file mode 100644
index 0000000..07bcaf6
--- /dev/null
+++ b/back-end/Taskfile.yaml
@@ -0,0 +1,48 @@
+
+#taskfile for building the libraries for admin and clients and creating their packages
+
+version: '3'
+
+vars:
+ DOTNET_BUILD_FLAGS: '/p:RunAnalyzersDuringBuild=false /p:BuildInParallel=true /p:MultiProcessorCompilation=true'
+
+tasks:
+
+ build:
+ dir: '{{.USER_WORKING_DIR}}'
+ cmds:
+ #build project
+ - dotnet publish -c release {{.DOTNET_BUILD_FLAGS}}
+
+ #postbuild to package artifaces into the archives for upload
+ postbuild_success:
+ dir: '{{.USER_WORKING_DIR}}'
+ vars:
+ #output directory for the build artifacts
+ OUT_DIR: 'bin/release/{{.TARGET_FRAMEWORK}}/publish'
+
+ cmds:
+ #pack up source code
+ - task: packsource
+
+ #copy license to output dir
+ - powershell -Command "cp '{{.MODULE_DIR}}/LICENSE.txt' -Destination '{{.OUT_DIR}}/LICENSE.txt'"
+
+ #tar the plugin output and put it in the bin dir
+ - cd {{.OUT_DIR}} && tar -czvf '{{.USER_WORKING_DIR}}/bin/release.tgz' .
+
+ packsource:
+ dir: '{{.USER_WORKING_DIR}}'
+ internal: true
+ cmds:
+ #copy source code to target
+ - powershell -Command "Get-ChildItem -Include *.cs,*.csproj -Recurse | Where { \$_.FullName -notlike '*\obj\*' -and \$_.FullName -notlike '*\bin\*' } | Resolve-Path -Relative | tar --files-from - -cvzf 'bin/src.tgz'"
+
+ #clean hook
+ clean:
+ dir: '{{.USER_WORKING_DIR}}'
+ ignore_error: true
+ cmds:
+ - dotnet clean -c release
+ - powershell -Command "Remove-Item -Recurse bin"
+ - powershell -Command "Remove-Item -Recurse obj" \ No newline at end of file
diff --git a/back-end/src/CMNext.sample.json b/back-end/src/CMNext.sample.json
new file mode 100644
index 0000000..1b3c516
--- /dev/null
+++ b/back-end/src/CMNext.sample.json
@@ -0,0 +1,44 @@
+{
+ //Enables debug logging
+ "debug": false,
+
+ "post_endpoint": {
+ "path": "/blog/posts"
+ },
+
+ "channel_endpoint": {
+ "path": "/blog/channels"
+ },
+
+ "content_endpoint": {
+ "path": "/blog/content",
+ "max_content_length": 50000000
+ },
+
+ "blog_channels": {
+ //The index file for storing channel configuration
+ "index_file_name": "blogs/channels.json"
+ },
+
+ //S3 setup with vault secrets
+ "disabled s3_config": {
+ "server_address": "",
+ "access_key": "",
+ "bucket": "",
+ "use_ssl": true,
+ "Region": null
+ },
+
+ "disabled ftp_config": {
+ "url": "",
+ "username": "",
+ //Base path within the ftp user's directory
+ "base_path": ""
+ },
+
+ "secrets": {
+ //Set the vault path to the s3 secret
+ "s3_secret": "",
+ "ftp_password": ""
+ }
+} \ No newline at end of file
diff --git a/back-end/src/Content.Publishing.Blog.Admin.csproj b/back-end/src/Content.Publishing.Blog.Admin.csproj
index cb6ade1..afbc9e1 100644
--- a/back-end/src/Content.Publishing.Blog.Admin.csproj
+++ b/back-end/src/Content.Publishing.Blog.Admin.csproj
@@ -7,6 +7,7 @@
<PackageReadmeFile>README.md</PackageReadmeFile>
<RootNamespace>Content.Publishing.Blog.Admin</RootNamespace>
<AssemblyName>CMNext</AssemblyName>
+ <Version>0.1.1</Version>
</PropertyGroup>
<PropertyGroup>
@@ -38,7 +39,7 @@
</ItemGroup>
<ItemGroup>
- <None Update="CMNExt.json">
+ <None Update="CMNext.sample.json">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>