Skip to content

Commit

Permalink
Merge pull request #122 from chuongmep/master
Browse files Browse the repository at this point in the history
Automatic Process CI/CD Maintain Support 2023
  • Loading branch information
daren-thomas committed Jun 29, 2022
2 parents ce5d21b + fd7508d commit c51e5ad
Show file tree
Hide file tree
Showing 101 changed files with 2,201 additions and 1,481 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
30 changes: 30 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,30 @@
### Purpose

(FILL ME IN) This section describes why this PR is here. Usually it would include a reference
to the tracking task that it is part or all of the solution for.

### Description

(FILL ME IN) Brief description of the fix / enhancement. **Mandatory section**

### Declarations

Check these if you believe they are true

- [ ] This PR fix bug
- [ ] This PR for new feature
- [ ] The codebase is in a better state after this PR
- [ ] The level of testing this PR includes is appropriate
- [ ] User facing strings, if any, are extracted into `*.resx` files
- [ ] Snapshot of UI changes, if any.
- [ ] This PR modifies some build requirements and the readme is updated

### Reviewers

(FILL ME IN) Reviewer 1 (If possible, assign the Reviewer for the PR)

(FILL ME IN, optional) Any additional notes to reviewers or testers.

### FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of
19 changes: 19 additions & 0 deletions .github/workflows/Workflow.yml
@@ -0,0 +1,19 @@
name: Workflow

on:
push:
branches:
- '**'
pull_request:
branches:
- '!master'

jobs:
windows:
name: windows-2022
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Run Nuke Build
run: ./.nuke/build.cmd --GitHubToken ${{ secrets.GITHUB_TOKEN }}
62 changes: 53 additions & 9 deletions .gitignore
@@ -1,9 +1,61 @@
#Ignore thumbnails created by Windows
Thumbs.db

#Ignore files built by Visual Studio
*.obj
*.exe
*.pdb
*.user
*.aps
*.pch
*.vspscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.cache
*.ilk
*.log
*.iref
*.db
*.ide
*.opendb
*.lock
*.ide-shm
*.ide-wal
*.dll
*.suo
[Bb]in
[Dd]ebug*/
*.lib
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
.vs/

#Rider
.idea

#Installer
output

#Nuget packages folder
packages/
*.html
*.htm

# Project specific files and folders to ignore
PythonConsoleControl/obj/
RevitPythonShell/obj/
RpsRuntime/obj/



# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand All @@ -15,7 +67,6 @@ __pycache__/
.Python
env/
bin/
build/
develop-eggs/
dist/
eggs/
Expand Down Expand Up @@ -60,12 +111,5 @@ docs/_build/

*.swp

# project specific stuff
.DS_Store
RevitPythonShell/Examples/Output
RevitPythonShell/Examples/Output_HelloWorld
*.suo


# Visual Studio 2015 cache/options directory
.vs/
.vs/
13 changes: 13 additions & 0 deletions .idea/.idea.RevitPythonShell/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/.idea.RevitPythonShell/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions .idea/.idea.RevitPythonShell/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/.idea.RevitPythonShell/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.RevitPythonShell/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .nuke/build.cmd
@@ -0,0 +1 @@
powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0Build.ps1" %*
69 changes: 69 additions & 0 deletions .nuke/build.ps1
@@ -0,0 +1,69 @@
[CmdletBinding()]
Param(
[Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)]
[string[]]$BuildArguments
)

Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)"

Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 }

###########################################################################
# CONFIGURATION
###########################################################################

$SolutionDirectory = Split-Path $PSScriptRoot -Parent
$BuildProjectFile = "$SolutionDirectory\Build\Build.csproj"
$TempDirectory = "$SolutionDirectory\.nuke\temp"

$DotNetGlobalFile = "$SolutionDirectory\global.json"
$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1"
$DotNetChannel = "Current"

$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE = 1
$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1
$env:DOTNET_MULTILEVEL_LOOKUP = 0

###########################################################################
# EXECUTION
###########################################################################

function ExecSafe([scriptblock] $cmd) {
& $cmd
if ($LASTEXITCODE) { exit $LASTEXITCODE }
}

# If dotnet CLI is installed globally and it matches requested version, use for execution
if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and `
$(dotnet --version) -and $LASTEXITCODE -eq 0) {
$env:DOTNET_EXE = (Get-Command "dotnet").Path
}
else {
# Download install script
$DotNetInstallFile = "$TempDirectory\dotnet-install.ps1"
New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile)

# If global.json exists, load expected version
if (Test-Path $DotNetGlobalFile) {
$DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json)
if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) {
$DotNetVersion = $DotNetGlobal.sdk.version
}
}

# Install by channel or version
$DotNetDirectory = "$TempDirectory\dotnet-win"
if (!(Test-Path variable:DotNetVersion)) {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath }
} else {
ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath }
}
$env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe"
}

Write-Output "Microsoft (R) .NET Core SDK version $(& $env:DOTNET_EXE --version)"

ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet }
ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments }

0 comments on commit c51e5ad

Please sign in to comment.