Skip to content

Commit c51e5ad

Browse files
authored
Merge pull request #122 from chuongmep/master
Automatic Process CI/CD Maintain Support 2023
2 parents ce5d21b + fd7508d commit c51e5ad

File tree

101 files changed

+2201
-1481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+2201
-1481
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
### Purpose
2+
3+
(FILL ME IN) This section describes why this PR is here. Usually it would include a reference
4+
to the tracking task that it is part or all of the solution for.
5+
6+
### Description
7+
8+
(FILL ME IN) Brief description of the fix / enhancement. **Mandatory section**
9+
10+
### Declarations
11+
12+
Check these if you believe they are true
13+
14+
- [ ] This PR fix bug
15+
- [ ] This PR for new feature
16+
- [ ] The codebase is in a better state after this PR
17+
- [ ] The level of testing this PR includes is appropriate
18+
- [ ] User facing strings, if any, are extracted into `*.resx` files
19+
- [ ] Snapshot of UI changes, if any.
20+
- [ ] This PR modifies some build requirements and the readme is updated
21+
22+
### Reviewers
23+
24+
(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)
25+
26+
(FILL ME IN, optional) Any additional notes to reviewers or testers.
27+
28+
### FYIs
29+
30+
(FILL ME IN, Optional) Names of anyone else you wish to be notified of

.github/workflows/Workflow.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '!master'
10+
11+
jobs:
12+
windows:
13+
name: windows-2022
14+
runs-on: windows-2022
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v1
18+
- name: Run Nuke Build
19+
run: ./.nuke/build.cmd --GitHubToken ${{ secrets.GITHUB_TOKEN }}

.gitignore

+53-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,61 @@
1+
#Ignore thumbnails created by Windows
2+
Thumbs.db
3+
4+
#Ignore files built by Visual Studio
5+
*.obj
6+
*.exe
7+
*.pdb
8+
*.user
9+
*.aps
10+
*.pch
11+
*.vspscc
12+
*_i.c
13+
*_p.c
14+
*.ncb
15+
*.suo
16+
*.tlb
17+
*.tlh
18+
*.bak
19+
*.cache
20+
*.ilk
21+
*.log
22+
*.iref
23+
*.db
24+
*.ide
25+
*.opendb
26+
*.lock
27+
*.ide-shm
28+
*.ide-wal
29+
*.dll
30+
*.suo
31+
[Bb]in
32+
[Dd]ebug*/
33+
*.lib
34+
*.sbr
35+
obj/
36+
[Rr]elease*/
37+
_ReSharper*/
38+
[Tt]est[Rr]esult*
39+
.vs/
40+
41+
#Rider
42+
.idea
43+
44+
#Installer
45+
output
46+
47+
#Nuget packages folder
48+
packages/
49+
*.html
50+
*.htm
51+
152
# Project specific files and folders to ignore
253
PythonConsoleControl/obj/
354
RevitPythonShell/obj/
455
RpsRuntime/obj/
556

657

58+
759
# Byte-compiled / optimized / DLL files
860
__pycache__/
961
*.py[cod]
@@ -15,7 +67,6 @@ __pycache__/
1567
.Python
1668
env/
1769
bin/
18-
build/
1970
develop-eggs/
2071
dist/
2172
eggs/
@@ -60,12 +111,5 @@ docs/_build/
60111

61112
*.swp
62113

63-
# project specific stuff
64-
.DS_Store
65-
RevitPythonShell/Examples/Output
66-
RevitPythonShell/Examples/Output_HelloWorld
67-
*.suo
68-
69-
70114
# Visual Studio 2015 cache/options directory
71-
.vs/
115+
.vs/

.idea/.idea.RevitPythonShell/.idea/.gitignore

+13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.RevitPythonShell/.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.RevitPythonShell/.idea/encodings.xml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.RevitPythonShell/.idea/indexLayout.xml

+8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/.idea.RevitPythonShell/.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.nuke/build.cmd

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0Build.ps1" %*

.nuke/build.ps1

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
[CmdletBinding()]
2+
Param(
3+
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
4+
[string[]]$BuildArguments
5+
)
6+
7+
Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"
8+
9+
Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }
10+
11+
###########################################################################
12+
# CONFIGURATION
13+
###########################################################################
14+
15+
$SolutionDirectory = Split-Path $PSScriptRoot -Parent
16+
$BuildProjectFile = "$SolutionDirectory\Build\Build.csproj"
17+
$TempDirectory = "$SolutionDirectory\.nuke\temp"
18+
19+
$DotNetGlobalFile = "$SolutionDirectory\global.json"
20+
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
21+
$DotNetChannel = "Current"
22+
23+
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
24+
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
25+
$env:DOTNET_MULTILEVEL_LOOKUP = 0
26+
27+
###########################################################################
28+
# EXECUTION
29+
###########################################################################
30+
31+
function ExecSafe([scriptblock] $cmd) {
32+
& $cmd
33+
if ($LASTEXITCODE) { exit $LASTEXITCODE }
34+
}
35+
36+
# If dotnet CLI is installed globally and it matches requested version, use for execution
37+
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
38+
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
39+
$env:DOTNET_EXE = (Get-Command "dotnet").Path
40+
}
41+
else {
42+
# Download install script
43+
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
44+
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
45+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
46+
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)
47+
48+
# If global.json exists, load expected version
49+
if (Test-Path $DotNetGlobalFile) {
50+
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
51+
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
52+
$DotNetVersion = $DotNetGlobal.sdk.version
53+
}
54+
}
55+
56+
# Install by channel or version
57+
$DotNetDirectory = "$TempDirectory\dotnet-win"
58+
if (!(Test-Path variable:DotNetVersion)) {
59+
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
60+
} else {
61+
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
62+
}
63+
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
64+
}
65+
66+
Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"
67+
68+
ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
69+
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }

0 commit comments

Comments
 (0)