-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
removed ruby/gem dependencies in env.ps1 and updated the docs, added markdownlint-hook.ps1, docs.ps1, and docker.ps1 #636
base: feature/distributed-demo
Are you sure you want to change the base?
Changes from all commits
ed76aaa
44b1a36
99f157e
7fe0795
f460288
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Get the version | ||
if ($args) { | ||
$Version = $args[0] | ||
} else { | ||
$Version = "development" | ||
} | ||
|
||
# Set environment variables | ||
$env:VERSION = $Version | ||
$env:COMMIT_HASH = (git rev-parse --short HEAD) | ||
$env:MKDOCS_ENABLE_PDF_EXPORT = 1 | ||
|
||
Write-Output "Version: $Version" | ||
|
||
# Remove the site directory if it exists | ||
if (Test-Path "site") { | ||
Remove-Item "site" -Recurse -Force | ||
} | ||
|
||
# Generate and publish documents | ||
Write-Output "Generate and publish documents..." | ||
& mkdocs build --config-file mkdocs.yml --site-dir "site/online/$Version" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is the |
||
|
||
# Copy redirect page | ||
Copy-Item "docs/redirect-page.html" "site/index.html" | ||
|
||
# Checkout webpage-docs branch | ||
git checkout webpage-docs | ||
|
||
# Clean up irrelevant files | ||
if (Test-Path "$Version") { | ||
Remove-Item "$Version" -Recurse -Force | ||
} | ||
|
||
# Move PDF file to top directory | ||
if (Test-Path "site/online/$Version") { | ||
Move-Item "site/online/$Version/pdf/DTaaS-docs.pdf" ".\DTaaS-$Version.pdf" | ||
Move-Item "site/online/$Version" ".\$Version" | ||
} | ||
|
||
# Move index.html to top directory and remove site directory | ||
Move-Item "site/index.html" "." | ||
Remove-Item "site" -Recurse -Force | ||
|
||
# Commit changes | ||
git add . | ||
git commit --no-verify -m "docs for $env:COMMIT_HASH commit" |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import subprocess | ||
import sys | ||
|
||
def markdownlint_hooks(files): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there an advantage to having two separate python programs? Can the |
||
command = ["mdl-check.py"] + files | ||
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
output = result.stdout.decode("utf-8") + result.stderr.decode("utf-8") | ||
print(output) | ||
|
||
if __name__ == "__main__": | ||
files = sys.argv[1:] | ||
markdownlint_hooks(files) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import subprocess | ||
import sys | ||
|
||
def mdl_check(files): | ||
command = ["mdl"] + files | ||
result = subprocess.run(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) | ||
output = result.stdout.decode("utf-8") + result.stderr.decode("utf-8") | ||
print(output) | ||
|
||
if __name__ == "__main__": | ||
files = sys.argv[1:] | ||
mdl_check(files) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing spaces