Skip to content

Commit 5dc4ecc

Browse files
committed
Add comprehensive documentation and improve devcontainer configuration
- Add detailed function documentation with synopsis, description, examples, and notes for all PowerShell functions - Improve devcontainer configuration with dynamic workspace folder support and cross-platform compatibility - Add GitHub templates for issues and pull requests - Include security policy, license, and gitignore files - Update documentation formatting and add new function reference docs - Enhance postCreate script with environment detection and better error handling
1 parent 053fb71 commit 5dc4ecc

39 files changed

+423
-71
lines changed

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This directory contains a comprehensive development container configuration for
4343
├── cache/ # Persistent cache directory
4444
└── README.md # This file
4545

46-
```
46+
```text
4747
4848
## 🔧 Configuration Details
4949

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"source=${localWorkspaceFolder}/.devcontainer/cache,target=/home/vscode/.cache,type=bind,consistency=cached"
9393
],
9494
"remoteUser": "vscode",
95-
"workspaceFolder": "/workspaces/OSDCloudCustomBuilder",
95+
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
9696
"shutdownAction": "stopContainer",
97-
"initializeCommand": "powershell -Command \"New-Item -ItemType Directory -Force -Path '${localWorkspaceFolder}/.devcontainer/cache'\""
97+
"initializeCommand": "bash -c 'mkdir -p \"${localWorkspaceFolder}/.devcontainer/cache\" 2>/dev/null || powershell -Command \"New-Item -ItemType Directory -Force -Path \\\"${localWorkspaceFolder}\\.devcontainer\\cache\\\"\" 2>/dev/null || true'"
9898
}

.devcontainer/postCreate.sh

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,49 @@ set -e
77

88
echo "🔧 Setting up OSDCloudCustomBuilder development environment..."
99

10-
# Set proper permissions for the workspace
11-
sudo chown -R vscode:vscode /workspaces/OSDCloudCustomBuilder
10+
# Source environment detection
11+
if [ -f ".devcontainer/environment-detection.sh" ]; then
12+
echo "🔍 Loading environment detection..."
13+
source .devcontainer/environment-detection.sh
14+
detect_environment
15+
else
16+
echo "⚠️ Environment detection script not found, using defaults..."
17+
export CONTAINER_ENV="docker"
18+
export HOST_OS="linux"
19+
export WORKSPACE_TYPE="devcontainer"
20+
fi
21+
22+
# Set proper permissions for the workspace (dynamic path)
23+
if [ "${WORKSPACE_TYPE}" = "devcontainer" ]; then
24+
sudo chown -R vscode:vscode "/workspaces/${PWD##*/}" 2>/dev/null || sudo chown -R vscode:vscode /workspaces/OSDCloudCustomBuilder 2>/dev/null || true
25+
else
26+
sudo chown -R vscode:vscode "${PWD}" 2>/dev/null || true
27+
fi
1228

1329
# Navigate to workspace
1430
cd /workspaces/OSDCloudCustomBuilder
1531

32+
# Configure Git based on environment
33+
echo "🔧 Configuring Git for environment..."
34+
case "${HOST_OS}" in
35+
"windows")
36+
git config --global core.autocrlf true
37+
git config --global core.eol crlf
38+
echo " Git configured for Windows host"
39+
;;
40+
"macos"|"linux")
41+
git config --global core.autocrlf input
42+
git config --global core.eol lf
43+
echo " Git configured for Unix host"
44+
;;
45+
*)
46+
git config --global core.autocrlf input
47+
git config --global core.eol lf
48+
echo " Git configured with default Unix settings"
49+
;;
50+
esac
51+
git config --global init.defaultBranch main
52+
1653
# Restore .NET dependencies
1754
if [ -f "OSDCloudCustomBuilder.csproj" ]; then
1855
echo "📦 Restoring .NET packages..."
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Bug Report
3+
about: Report a reproducible bug
4+
title: "[Bug] "
5+
labels: bug
6+
---
7+
8+
## Description
9+
10+
## Repro Steps
11+
12+
1. ...
13+
14+
## Expected Behavior
15+
16+
## Actual Behavior
17+
18+
## Environment
19+
- PowerShell version:
20+
- Module version:
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Documentation Update
3+
about: Report a documentation issue
4+
title: "[Docs] "
5+
labels: documentation
6+
---
7+
8+
## Affected Document
9+
10+
## Describe the issue
11+
12+
## Suggested Fix or Improvement
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Feature Request
3+
about: Suggest a feature or improvement
4+
title: "[Feature] "
5+
labels: enhancement
6+
---
7+
8+
## What is your idea?
9+
10+
## Why is it needed?
11+
12+
## Alternatives considered?

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Pull Request Template
2+
3+
## Description
4+
5+
## Changes Made
6+
- [ ] Code changes
7+
- [ ] Docs updated
8+
- [ ] Tests added/updated
9+
- [ ] Build/test passes
10+
11+
## Related Issues
12+
13+
Closes #
14+
15+
## Checklist
16+
- [ ] I ran tests
17+
- [ ] I updated docs
18+
- [ ] I followed style guidelines

.gitignore

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# PowerShell
3+
*.ps1xml
4+
*.psd1
5+
*.psm1
6+
7+
# .NET
8+
bin/
9+
obj/
10+
*.user
11+
*.suo
12+
13+
# DevContainers
14+
.vscode/
15+
.devcontainer/
16+
.vs/
17+
.vscode-server/
18+
*.code-workspace
19+
20+
# Tests
21+
TestResults/
22+
coverage/
23+
24+
# Node
25+
node_modules/
26+
dist/

CHANGELOG.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Changelog
22

3-
## [1.0.0] - Initial Release
3+
All notable changes to this project will be documented here.
4+
5+
## [1.0.0] - 2025-05-24
6+
47
### Added
5-
- Migrated all module scripts, documentation, and structure.
6-
- Help comments for public functions.
7-
- Export-ModuleMember and FunctionsToExport configuration.
8-
- GitHub Actions CI workflow with PSScriptAnalyzer and Pester.
9-
- Markdown documentation for public functions.
10-
- Installation script for easy deployment.
8+
9+
- Full function help documentation
10+
- CI workflow with Pester & ScriptAnalyzer
11+
- DevContainer with platform detection
12+
- `Invoke-Build.ps1` and versioning system

LICENSE

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# MIT License
2+
3+
Copyright (c) 2025
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files...

0 commit comments

Comments
 (0)