-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
864 changed files
with
7,208 additions
and
2,450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ jobs: | |
- uses: arup-group/actions-composite-oasys-jira-check/branch@main | ||
if: startsWith( github.ref, 'refs/heads/release') == false | ||
with: | ||
valid-branch-names: task|test|bugfix|feature|hotfix|epic | ||
valid-branch-names: task|test|bugfix|feature|hotfix|epic|feat | ||
jira-username: [email protected] | ||
jira-password: ${{ secrets.JIRA_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
default_stages: [pre-commit] | ||
|
||
repos: | ||
# - repo: local | ||
# hooks: | ||
# | ||
# - id: dotnet-format | ||
# name: Format | ||
# entry: dotnet format --exclude-diagnostics --verify-no-changes --verbosity diagnostic | ||
# language: system | ||
# pass_filenames: false | ||
# always_run: true | ||
|
||
# - id: dotnet-test-coverage | ||
# name: Run dotnet tests with coverage | ||
# entry: powershell.exe -NoProfile -ExecutionPolicy Bypass -File coverage.ps1 | ||
# stages: [pre-commit] | ||
# language: system | ||
# pass_filenames: false | ||
|
||
- repo: https://github.com/commitizen-tools/commitizen | ||
rev: v3.13.0 | ||
hooks: | ||
- id: commitizen | ||
stages: [commit-msg] | ||
|
||
# this should go last since it will fix line endings broken by other tools | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
#- id: check-case-conflict | ||
- id: check-yaml | ||
- id: check-ast | ||
- id: check-merge-conflict | ||
- id: double-quote-string-fixer | ||
- id: trailing-whitespace | ||
exclude: .github | ||
args: [--markdown-linebreak-ext=md] | ||
- id: end-of-file-fixer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
|
||
function Has-Version { | ||
param ($version) | ||
|
||
# Check if the version argument is provided | ||
if ($version.Count -eq 0) { | ||
Write-Host "Please provide the version number as an argument. Usage: .\bump-version.ps1 <new-version>" | ||
exit | ||
} | ||
|
||
# Get the new version from the CLI argument | ||
return $version[0] | ||
} | ||
|
||
$newVersion = Has-Version($args) | ||
|
||
# Function to validate the version format (X.X.X where X is a number) | ||
function Validate-VersionFormat { | ||
param ( | ||
[string]$version | ||
) | ||
|
||
# Regex pattern for validating version format (X.X.X) | ||
$versionPattern = '^\d+\.\d+\.\d+$' | ||
|
||
# Check if version matches the pattern | ||
return $version -match $versionPattern | ||
} | ||
|
||
# Function to update version in a file | ||
function Update-Version { | ||
param ( | ||
[string]$filePath, | ||
[string]$searchPattern, | ||
[string]$newVersion, | ||
[string]$replacementPattern | ||
) | ||
|
||
# Read the content of the file | ||
$content = Get-Content $filePath | ||
|
||
# Replace the version based on the provided pattern and replacement | ||
$updatedContent = $content -replace $searchPattern, $replacementPattern | ||
|
||
# Write the updated content back to the file | ||
Set-Content $filePath -Value $updatedContent | ||
|
||
Write-Host "Updated version in $filePath to $newVersion" | ||
} | ||
|
||
# Check if the version format is valid | ||
if (-not (Validate-VersionFormat $newVersion)) { | ||
Write-Host "Invalid version format. Please use the format: X.X.X where X is a number." | ||
exit | ||
} | ||
|
||
# Define the paths and patterns for each file | ||
$filesToUpdate = @( | ||
@{ | ||
FilePath = ".\GsaGH\GsaGH.csproj" | ||
SearchPattern = '<Version>(.*?)<\/Version>' | ||
ReplacementPattern = "<Version>$newVersion</Version>" | ||
}, | ||
@{ | ||
FilePath = ".\GsaGH\GsaGHInfo.cs" | ||
SearchPattern = 'string GrasshopperVersion = "(.*?)"' | ||
ReplacementPattern = 'string GrasshopperVersion = "' + $newVersion + '"' | ||
} | ||
) | ||
|
||
# Loop through each file and update the version | ||
foreach ($file in $filesToUpdate) { | ||
Update-Version -filePath $file.FilePath -searchPattern $file.SearchPattern -newVersion $newVersion -replacementPattern $file.ReplacementPattern | ||
} | ||
|
||
Write-Host "Version update completed." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.