From 10600ae4f123a9b85e5c4642d48f4d3305f4358e Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Sat, 30 Apr 2022 12:56:05 -0500 Subject: [PATCH] refactor: Rename project & links in scripts, code, etc --- .github/workflows/build.yml | 8 ++++---- .github/workflows/sonarcloud.yml | 4 ++-- Prepare-Release.ps1 | 6 +++--- ci/Publish.ps1 | 2 +- ci/SmokeTest.ps1 | 10 +++++----- ci/notify/discord_notify.py | 12 ++++++------ schemas/settings-schema.json | 6 +++--- src/Recyclarr/trash-config-template.yml | 8 ++++---- src/TrashLib/Config/Settings/SettingsPersister.cs | 6 +++--- .../Radarr/CustomFormat/CustomFormatUpdater.cs | 2 +- .../Sonarr/ReleaseProfile/ReleaseProfileUpdater.cs | 2 +- 11 files changed, 33 insertions(+), 33 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2b4308b2..5fd93956 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: - name: Upload Artifacts uses: actions/upload-artifact@v3 with: - name: trash-${{ matrix.runtime }} + name: recyclarr-${{ matrix.runtime }} path: publish/${{ matrix.runtime }}/* smoke: @@ -79,11 +79,11 @@ jobs: - name: Download Artifacts uses: actions/download-artifact@v3 with: - name: trash-${{ matrix.runtime }} + name: recyclarr-${{ matrix.runtime }} - name: Run Smoke Test shell: pwsh - run: ci/SmokeTest.ps1 ./trash + run: ci/SmokeTest.ps1 ./recyclarr release: name: Release @@ -124,7 +124,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.PAT }} with: - files: publish-zip/trash-*.zip + files: publish-zip/recyclarr-*.zip body: ${{ steps.changelog.outputs.release_notes }} tag_name: ${{ github.event.create.ref }} draft: false diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 7086beae..99646fd8 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -48,8 +48,8 @@ jobs: run: > dotnet sonarscanner begin -o:"rcdailey" - -k:"rcdailey_trash-updater" - -n:"Trash Updater" + -k:"rcdailey_recyclarr" + -n:"Recyclarr" -v:"${{ steps.gitversion.outputs.fullSemVer }}" -d:sonar.login="${{ secrets.SONAR_TOKEN }}" -d:sonar.host.url="https://sonarcloud.io" diff --git a/Prepare-Release.ps1 b/Prepare-Release.ps1 index 0a6b97e0..853350e6 100644 --- a/Prepare-Release.ps1 +++ b/Prepare-Release.ps1 @@ -8,9 +8,9 @@ $version = dotnet-gitversion /showvariable SemVer # Requires: Install-Module -Name ChangelogManagement Update-Changelog -ReleaseVersion $version -LinkMode Automatic -LinkPattern @{ - FirstRelease = "https://github.com/rcdailey/trash-updater/releases/tag/v{CUR}" - NormalRelease = "https://github.com/rcdailey/trash-updater/compare/v{PREV}...v{CUR}" - Unreleased = "https://github.com/rcdailey/trash-updater/compare/v{CUR}...HEAD" + FirstRelease = "https://github.com/rcdailey/recyclarr/releases/tag/v{CUR}" + NormalRelease = "https://github.com/rcdailey/recyclarr/compare/v{PREV}...v{CUR}" + Unreleased = "https://github.com/rcdailey/recyclarr/compare/v{CUR}...HEAD" } # Read & Write the file after updating the changelog to force a newline at the end of the file. The diff --git a/ci/Publish.ps1 b/ci/Publish.ps1 index 6e0df958..a4f7d4f5 100644 --- a/ci/Publish.ps1 +++ b/ci/Publish.ps1 @@ -6,7 +6,7 @@ param ( $ErrorActionPreference = "Stop" -dotnet publish src\Trash ` +dotnet publish src\Recyclarr ` --output publish\$runtime ` --configuration Release ` --runtime $runtime ` diff --git a/ci/SmokeTest.ps1 b/ci/SmokeTest.ps1 index 1a2f47dc..e77df8c5 100644 --- a/ci/SmokeTest.ps1 +++ b/ci/SmokeTest.ps1 @@ -1,19 +1,19 @@ [CmdletBinding()] param ( [Parameter(Mandatory = $true)] - [string] $PathToTrashExe + [string] $PathToExe ) $ErrorActionPreference = "Stop" if (Get-Command chmod -errorAction SilentlyContinue) { "The chmod command was found. Setting read + execute permission." - & chmod +rx $PathToTrashExe + & chmod +rx $PathToExe } -"Execute trash command to ensure basic functionality is working" -& $PathToTrashExe -h +"Execute recyclarr command to ensure basic functionality is working" +& $PathToExe -h if ($LASTEXITCODE -ne 0) { - "Trash executable failed to run with exit code: $LASTEXITCODE" + "Recyclarr executable failed to run with exit code: $LASTEXITCODE" exit -1 } diff --git a/ci/notify/discord_notify.py b/ci/notify/discord_notify.py index f9fa093d..bb748f56 100644 --- a/ci/notify/discord_notify.py +++ b/ci/notify/discord_notify.py @@ -26,17 +26,17 @@ mkdown_desc = f''' embed = DiscordEmbed( title=f'New Release {version}', description=mkdown_desc, - url=f'https://github.com/rcdailey/trash-updater/releases/tag/{version}' + url=f'https://github.com/rcdailey/recyclarr/releases/tag/{version}' ) embed.set_author( - name='Trash Updater', - url='https://github.com/rcdailey/trash-updater', - icon_url='https://github.com/rcdailey/trash-updater/blob/master/ci/notify/trash-icon.png?raw=true') + name='Recyclarr', + url='https://github.com/rcdailey/recyclarr', + icon_url='https://github.com/rcdailey/recyclarr/blob/master/ci/notify/trash-icon.png?raw=true') def add_links(os_name, archs, os): - url_base = f'https://github.com/rcdailey/trash-updater/releases/download/{version}' - download_links = ', '.join(f'[{arch}]({url_base}/trash-{os}-{arch}.zip)' for arch in archs) + url_base = f'https://github.com/rcdailey/recyclarr/releases/download/{version}' + download_links = ', '.join(f'[{arch}]({url_base}/recyclarr-{os}-{arch}.zip)' for arch in archs) embed.add_embed_field(name=os_name, value=f'[{download_links}]') add_links('Linux', ('x64', 'arm', 'arm64'), 'linux') diff --git a/schemas/settings-schema.json b/schemas/settings-schema.json index e11f09d9..a017866f 100644 --- a/schemas/settings-schema.json +++ b/schemas/settings-schema.json @@ -5,8 +5,8 @@ "Settings": { "type": "object", "additionalProperties": false, - "title": "Trash Updater Settings", - "description": "Optional settings to control the behavior of Trash Updater", + "title": "Recyclarr Settings", + "description": "Optional settings to control the behavior of Recyclarr", "properties": { "repository": { "$ref": "#/definitions/Repository" @@ -27,7 +27,7 @@ "clone_url": { "type": "string", "title": "Clone URL to the trash guides git repository", - "description": "A URL compatible with `git clone` that is used to clone the Trash Guides repository. This setting exists for enthusiasts that may want to instead have Trash Updater pull data from a fork instead of the official repository.", + "description": "A URL compatible with `git clone` that is used to clone the Trash Guides repository. This setting exists for enthusiasts that may want to instead have Recyclarr pull data from a fork instead of the official repository.", "format": "uri", "qt-uri-protocols": [ "http", diff --git a/src/Recyclarr/trash-config-template.yml b/src/Recyclarr/trash-config-template.yml index 22d62149..9c7a3d15 100644 --- a/src/Recyclarr/trash-config-template.yml +++ b/src/Recyclarr/trash-config-template.yml @@ -1,11 +1,11 @@ -# A starter config to use with Trash Updater. Most values are set to "reasonable defaults". -# Update the values below as needed for your instance. You will be required to update the -# API Key and URL for each instance you want to use. +# A starter config to use with Recyclarr. Most values are set to "reasonable defaults". Update the +# values below as needed for your instance. You will be required to update the API Key and URL for +# each instance you want to use. # # Many optional settings have been omitted to keep this template simple. # # For more details on the configuration, see the Configuration Reference on the wiki here: -# https://github.com/rcdailey/trash-updater/wiki/Configuration-Reference +# https://github.com/rcdailey/recyclarr/wiki/Configuration-Reference # Configuration specific to Sonarr sonarr: diff --git a/src/TrashLib/Config/Settings/SettingsPersister.cs b/src/TrashLib/Config/Settings/SettingsPersister.cs index bf592ef5..68c8dcd6 100644 --- a/src/TrashLib/Config/Settings/SettingsPersister.cs +++ b/src/TrashLib/Config/Settings/SettingsPersister.cs @@ -42,11 +42,11 @@ public class SettingsPersister : ISettingsPersister private void CreateDefaultSettingsFile() { const string fileData = - "# yaml-language-server: $schema=https://raw.githubusercontent.com/rcdailey/trash-updater/master/schemas/settings-schema.json\n" + + "# yaml-language-server: $schema=https://raw.githubusercontent.com/rcdailey/recyclarr/master/schemas/settings-schema.json\n" + "\n" + - "# Edit this file to customize the behavior of Trash Updater beyond its defaults\n" + + "# Edit this file to customize the behavior of Recyclarr beyond its defaults\n" + "# For the settings file reference guide, visit the link to the wiki below:\n" + - "# https://github.com/rcdailey/trash-updater/wiki/Settings-Reference\n"; + "# https://github.com/rcdailey/recyclarr/wiki/Settings-Reference\n"; _fileSystem.File.WriteAllText(_paths.SettingsPath, fileData); } diff --git a/src/TrashLib/Radarr/CustomFormat/CustomFormatUpdater.cs b/src/TrashLib/Radarr/CustomFormat/CustomFormatUpdater.cs index 2243b97c..ad1b8926 100644 --- a/src/TrashLib/Radarr/CustomFormat/CustomFormatUpdater.cs +++ b/src/TrashLib/Radarr/CustomFormat/CustomFormatUpdater.cs @@ -137,7 +137,7 @@ internal class CustomFormatUpdater : ICustomFormatUpdater if (_guideProcessor.DuplicatedCustomFormats.Count > 0) { Log.Warning("One or more of the custom formats you want are duplicated in the guide. These custom " + - "formats WILL BE SKIPPED. Trash Updater is not able to choose which one you actually " + + "formats WILL BE SKIPPED. Recyclarr is not able to choose which one you actually " + "wanted. To resolve this ambiguity, use the `trash_ids` property in your YML " + "configuration to refer to the custom format using its Trash ID instead of its name"); diff --git a/src/TrashLib/Sonarr/ReleaseProfile/ReleaseProfileUpdater.cs b/src/TrashLib/Sonarr/ReleaseProfile/ReleaseProfileUpdater.cs index b1a584fd..badc3a60 100644 --- a/src/TrashLib/Sonarr/ReleaseProfile/ReleaseProfileUpdater.cs +++ b/src/TrashLib/Sonarr/ReleaseProfile/ReleaseProfileUpdater.cs @@ -101,7 +101,7 @@ internal class ReleaseProfileUpdater : IReleaseProfileUpdater } } - // Any profiles with `[Trash]` in front of their name are managed exclusively by Trash Updater. As such, if + // Any profiles with `[Trash]` in front of their name are managed exclusively by Recyclarr. As such, if // there are any still in Sonarr that we didn't update, those are most certainly old and shouldn't be kept // around anymore. await DeleteOldManagedProfiles(profilesAndTags, existingProfiles);