Skip to content

Commit

Permalink
Merge pull request #202 from supermemo/project-infrastructure-2.1.0
Browse files Browse the repository at this point in the history
Project infrastructure 2.1.0
  • Loading branch information
alexis- authored Apr 25, 2020
2 parents 68f07df + b37d5ad commit 7ef5377
Show file tree
Hide file tree
Showing 234 changed files with 3,802 additions and 3,158 deletions.
1 change: 1 addition & 0 deletions .githooks
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.githooks-src
1 change: 1 addition & 0 deletions .githooks-src/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/usr/bin/env powershell
55 changes: 55 additions & 0 deletions .githooks-src/commit-msg.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
try {
$prefixes = @(
"- Added",
"- Removed",
"- Updated",
"- Fixed",
"- Misc"
)

# $args[0] should contain the path to a file with the user's commit message
if (!(Test-Path $args[0])) {
Write-Host "An error occured while verifying commit message: the commit message file '$args[0]' doesn't exist."
exit 1
}

# Parse the file's commit message
$errors = New-Object Collections.Generic.List[string]
[int] $i = 1

foreach ($line in [string[]] (Get-Content $args[0])) {
$line = $line.Trim();

if ($prefixes.Where({ $line.StartsWith($_) }).Count -eq 0) {
$errors.Add("[line $i] Missing prefix in '$line'")
}

$i++
}

# If any error, display error message & fail
if ($errors.Count -gt 0)
{
$red=""
$nocolor=""

$errMsg = @"
Errors:
$($errors -Join "`n")
Your commit lines should start with one of those prefixes:
'$($prefixes -Join "'; '")'
/!\ ERROR: Your commit message contained errors. Read above for more details.
"@
Write-Host -ForegroundColor Red $errMsg

exit 1
}

exit 0
}
catch {
Write-Host "An error occured while verifying commit message: $_"
exit -1
}
1 change: 1 addition & 0 deletions .githooks-src/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#!/usr/bin/env powershell
45 changes: 45 additions & 0 deletions .githooks-src/pre-commit.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
try {
# https://github.com/Microsoft/vswhere/wiki/Find-MSBuild
function Find-MSBuild( [string] $vswhere ) {
return & $vswhere -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe | select-object -first 1
}

# https://github.com/microsoft/vswhere/wiki/Find-VSTest
function Find-VSTest( [string] $vswhere ) {
$path = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.Web -requiresAny -property installationPath
return Join-Path $path 'Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe'
}

# Recursively search for all .csproj files under the src folder
function Find-Projects {
return Get-ChildItem -Path src -Filter "*.csproj" -Recurse -ErrorAction SilentlyContinue -Force
}

# Run tests on the given projects
function Run-Tests ( [string] $vstest, [string[]] $projects ) {
#

& $vstest $projectDlls "/InIsolation" "/Logger:trx"
}

# Get MSBuild
# $vswhere = "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"

# $vstest = Find-VSTest $vswhere
# $msbuild = Find-MSBuild $vswhere

# Find all the projects
# $projects = Find-Projects

# TODO: Build projects
#

# Run tests
# $testResults = Run-Tests $vstest $projects

exit 0
}
catch {
Write-Host "An error occured while verifying commit: $_"
exit -1
}
11 changes: 10 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,14 @@
path = src/Services/SuperMemoAssistant.Services.HTML
url = https://github.com/supermemo/SuperMemoAssistant.Services.HTML.git
[submodule "src/Core/SuperMemoAssistant.Interop"]
path = src/Core/SuperMemoAssistant.Interop
path = src/Interop
url = https://github.com/supermemo/SuperMemoAssistant.Interop.git
[submodule "src/Build/MSBuild"]
path = src/Build/MSBuild
url = https://github.com/supermemo/SuperMemoAssistant.Sdk.git
[submodule "src/Build/VS"]
path = src/Build/VS
url = https://github.com/supermemo/SuperMemoAssistant.Sdk.VisualStudio.git
[submodule "libs/VisualStudio.GitHooks"]
path = libs/VisualStudio.GitHooks
url = https://github.com/alexis-/VisualStudio.GitHooks.git
81 changes: 56 additions & 25 deletions ChangeLogs
Original file line number Diff line number Diff line change
@@ -1,40 +1,71 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT UNLESS YOU KNOW WHAT YOU ARE DOING.
# CHANGE LOG

[Next version (8ed0039c8c84a5cef88711d01a9ffb9531ad99ca)]
- Added: Solution-wide Directory.Build.Props
- Updated: SMA SDK csproj transition WIP
- Fixed: Issue where updater wouldn't recognize identical target and local versions


[2.0.4.88]
[Next version (21075141d870f5aca56c6696b8264e4a223652e5)]
- Added: VS GitHooks submodule
- Added: Directory.Build.targets (moved Microsoft.SourceLink.GitHub and Nerdbank.GitVersioning PackageReferences)
- Added: SuperMemoAssistant MSBuild SDKs under src/Build/MSBuild
- Added: Visual Studio SMA extension and plugin C# templates under src/Build/VS
- Added: Global package settings in Directory.Build.Props
- Added: SMA SDK references in global.json
- Added: SuperMemoAssistant.Interop submodule
- Added: SuperMemoAssistant.Services.HTML submodule
- Added: SuperMemoAssistant.Services.Medias.Images submodule
- Added: SuperMemoAssistant.Services.Sentry submodule
- Added: SuperMemoAssistant.Services.UI submodule
- Added: Build targets for packaging & change log (WIP)
- Added: Package information to SuperMemoAssistant.Interop
- Added: Default NuSpec package information
- Added: Default NuSpec <icon>
- Added: robot icon for NuSpec <icon> node
- Added a Directory.Build.Props in src/ which defines the global project values
- Added: Quote file
- Added: Random quotes to the collection selection window from a tsv file.
- Updated: Packages
- Fixed: Update channel selection
- Removed: Console logging
- Remove console logging
- Add random quotes to the collection selection window from a tsv file.


[2.0.4.84]
- Added: Solution-wide Directory.Build.Props
- Added: Only one instance of SMA can be run #156
- Added: Rescue tool ("SMA Updater") which can install or update to any SMA version #152
- Added: Installer ability to rollback to a previous version #151
- Added: Distribution channels for SMA updates (stable, beta, nightly) #86
- Added: Update settings accessible from Collection Window
- Added: Shortcut for "SMA Updater" on install
- Added: Debug symbols (pdb) to Services nuspec
- Updated: Cleaned template plugin's csproj for integration in the VS extension's C# templates
- Updated: Fixed several issue with Directory.Build.Props
- Updated: Added default settings in version.json
- Updated: Moved UI from Core to AppHost
- Updated: Cleaned NativeLib
- Updated: Packages default icon is now hidden in the solution explorer
- Updated: AsyncErrorHandler now uses conditional debug
- Updated: Submodules' Project (csproj) to the new SDK format
- Updated: Generate documentation to default
- Updated: Plugins' project (csproj) to the new SDK format
- Updated: Packages
- Updated: Project (csproj) format to the new SDK format
- Updated: Moved all resources to the assets folder
- Updated: Refactored projects to make their organization more clean and consistent
- Updated: SMA SDK csproj transition WIP
- Updated: Change log
- Updated: Stub executable now selects the version based on the local RELEASES file first #161 #151
- Updated: Improved Installer ability to optimize the download size by choosing delta updates
- Updated: All windows' default size are less or equal to 800x600 #160
- Updated: Tool tips (wip) #166
- Updated: All projects to PackageReference
- Updated: Change log is now generated before build to include the include the latest commit messages in the package
- Updated: Packages
- Fixed: Async/Await would sometime freeze in case of issue during initialization
- Fixed: Solution didn't point to SuperMemoAssistant.Interop
- Fixed: Issue where updater wouldn't recognize identical target and local versions
- Fixed: Update channel selection
- Fixed: SMA interrupts update mid-way when exiting #88 #161 #151
- Removed: SuperMemoAssistant.Interop (replacing with submodule)
- Removed: SuperMemoAssistant.Services.HTML (replacing with submodule)
- Removed: SuperMemoAssistant.Services.Medias.Images (replacing with submodule)
- Removed: SuperMemoAssistant.Services.Sentry (replacing with submodule)
- Removed: SuperMemoAssistant.Services.UI (replacing with submodule)
- Removed: SuperMemoAssistant.Interop.Shared project (transferring to submodule)
- Removed: Console logging
- Removed: nuget.config
- Remove console logging
- Add random quotes to the collection selection window from a tsv file.


[2.0.3.451]
Expand Down Expand Up @@ -88,6 +119,7 @@
- Updated some NuGet packages
- Updated Subrepo ref
- Fixed an issue where Anotar.Serilog was kept as a reference https://github.com/Fody/Anotar/issues/324
- Removed Forge.Forms submodule
- Plugin Manager is now initialized on startup (but plugins are still run after SM has started)
- Plugin enabled/Disabled is temporarily hidden
- Remove Hint Pattern from the option UI
Expand Down Expand Up @@ -118,7 +150,6 @@
- (Sys.IO.*) Moved Sys.IO.* file and directory facilities to their own NuGet Extensions.System.IO
- (Extensions.System.IO) Added submodule
- Many other minor fixes & enhancements
- Removed Forge.Forms submodule
- Removing Forge.Forms submodule, Removing Extensions.System.IO for re-addition afterward (bug)
- Turned SuperMemoAssistant.Services.Sentry in a class library
- Minor fixes
Expand All @@ -137,9 +168,9 @@

[2.0.2.67]
- Added SM exe setup window
- Removed JetBrains annotations
- Improved KeyboardHook logging
- App.xaml.cs: Replaced Environment.Exit with Shutdown
- Removed JetBrains annotations
- SMATaskbarIcon: Fixed null issue when right clicking the tray icon
- NativeDataCfg.json: Updated versions number
- InjectLib: Better exception handling
Expand All @@ -159,14 +190,14 @@
- Fixed an issue where creating non-memorized element with repetition history would prompt a warning dialog in SM (rep history totally removed from element builder string)
- Fixed logging
- Fixed logging issues
- Removed Feeds plugin
- Removed sentry debug
- Misc minor fixes
- Update README.md
- Temporary fix for exception when restoring OnMessage addr
- Removed Feeds plugin
- Enhanced concept handling
- Several minor fixes/additions (Extensions, RemoteTasks, ..)
- Package update
- Removed sentry debug
- Add license scan report and status
- Signed-off-by: fossabot <badges@fossa.io>
- Minor fixes
Expand Down Expand Up @@ -211,6 +242,11 @@
- Fixed several bugs in Component, Element, Members registries
- Fixed binary file structures
- Fixed slot file paths for .html & .jpg registry members
- Removed Resources
- Removed Patagames WPF submodule
- Removed ModuleInit from SuperMemoAssistant.Core
- Removed legacy code (Menus, ElementDataWdw)
- Removed MediaPlayer plugin from this repo
- Misc. minor improvements
- Misc minor improvements
- Misc fixes
Expand Down Expand Up @@ -246,10 +282,8 @@
- Other fixes/refactoring/...
- Plugin isolation
- Settings (plugins, layouts, ...)
- Removed Resources
- Minor push
- Deleted submodule
- Removed Patagames WPF submodule
- Plugin isolation + UI
- Lot of refactoring + improvements
- Remoting/plugin interop additions/fixes
Expand Down Expand Up @@ -281,22 +315,19 @@
- NativeFuncScanner overhaul (caching, centralized procedure store, ...)
- CorePlugin + CoreCfg
- Disabled InitOnLoad
- Removed ModuleInit from SuperMemoAssistant.Core
- Fix for Delete preventing update in ElementBase
- Changed default ElementBuilder.TextContent Encoding to Unicode
- Refactored Svc
- Several minor fixes/refactor
- Improved Element/Component builder
- PluginHost/App WIP
- Fixing KeyboardHook.cs
- Removed legacy code (Menus, ElementDataWdw)
- Started removing FlaUI library
- Handle WM_QUIT in WndProc
- Smaller fixes
- New MainThread execution method
- New keyboard hotkey capture method
- Configured Serilog Logger
- Removed MediaPlayer plugin from this repo
- Many fixes/additions
- Many core addition, improvements, bug fixes
- Renamed ControlWeb to ControlHtml.cs
Expand Down
Loading

0 comments on commit 7ef5377

Please sign in to comment.