Luminary.FED.Copy 1.0.13

dotnet tool install --global Luminary.FED.Copy --version 1.0.13                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Luminary.FED.Copy --version 1.0.13                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Luminary.FED.Copy&version=1.0.13                
nuke :add-package Luminary.FED.Copy --version 1.0.13                

Luminary FED Copy

This utility is used to download FED assets from a remote location and copy them into a BED source repository.

What the tool does

The tool carries out the following actions in the given order based on configuration parameters.

  1. Remote Download - Downloads the release zip file from a given Netlify URL. Retries 3 times if file size is below 1024 bytes. The minimum file size and number of retries can be configured.

  2. Unzip - Extracts all files to a folder with the current timestamp within _fedcopy folder. Deletes the zip file by default. Configuration can be changed to retain the zip file after successful extraction.

  3. File Copy - Copies individual files from the extracted zip folder to a given location within the source code. Files will be overwritten. When specifying file paths use a forward slash (/) rather than a back slash (\) to support running this tool on a macOS.

  4. Folder Copy - Copies folders recursively from the extracted zip folder to a given location within the source code. Child items can be ignored. Existing destination folders can be deleted prior to copying. If not existing folders and files will be overwritten. When specifying folder paths use a forward slash (/) rather than a back slash (\) to support running this tool on a macOS.

  5. Cleanup - Cleans up extraction folders based on how many should be retained. This minimizes disk space usage, but allows for file comparison if needed.

  6. Cache Busting - Adds a version string query parameter to specified instances of css and js file references within master layouts and master pages. The regular expression (\\?v=)(\\d{10}) matches a ?v= followed by 10 digits. A replacment regex like ${{1}}{0} will use the first group and replace the rest with the download identifier.

  7. Code commit - Commits FED code with a meangingful message to the BED source code. The commit message could be customised. By default it uses the download identifier and the FED commit ID from the _redirects file in the downloaded ZIP file. The default setting is to abort FedCopy if any uncommitted files are found. Developers will need to push changes to the git repo manually.

Installation

Prerequisites for this tool

Make sure .NET 8.0 is installed on your machine. Check using dotnet --version and install the .Net 8.0.401 SDK or the higher if you don't have it. You need to install the SDK and not the runtime for your choice of operating system.

.NET Tool

The recommended way of obtaining this tool is installing it as a .NET Tool. You should install it as a global tool.

Install tool

If FedCopy is not installed on your local machine, install the tool via the commandline.

dotnet tool install -g Luminary.FED.Copy

If you run into any issues, Troubleshoot .NET tool usage issues.

Version check

Check the version with dotnet tool list -g command.

Update tool

To update the tool, run the following command via the commandline.

dotnet tool update -g Luminary.FED.Copy

Don't forget to update your project's README.md file when you update the tool.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.13 154 8/27/2024
1.0.12 729 8/13/2021
1.0.11 450 8/4/2021
1.0.10 394 6/2/2021
1.0.9 436 5/3/2021
1.0.8 445 4/21/2021
1.0.7 377 4/20/2021
1.0.6 413 4/20/2021
1.0.5 426 4/19/2021
1.0.4 440 3/5/2021
1.0.3 408 3/3/2021
1.0.2 397 2/26/2021
1.0.1 423 2/25/2021
1.0.0 410 2/20/2021

v 1.0.13 (19-Aug-2024)

Bug Fixes:
* Added retry logic when the file size is less than 1024 bytes.

Enhancements:
* Upgraded to .NET 8.0.
* Upgraded LibGit2Sharp from version 0.27.0 to 0.30.0.

v 1.0.12 (11-Aug-2021)

Bug Fixes:
* Updated to a preview version of LibGit2Sharp (0.27.0-preview-0102) in order to overcome "System.AccessViolationException: Attempted to read or write protected memory." error.


v 1.0.11 (04-Aug-2021)

Enhancements:
* Introduced new Netlify V2 Download Service to overcome 20 MB limit imposed by Netlify
* Ability to keep extracted zip files rather than automatically deleting them (via a config change)
* More debug logs introduced with a config flag to turn it on


v 1.0.10 (02-Jun-2021)

Bug Fixes:
* Fixed issue with path normalization when replacement items in cache buster are not set


v 1.0.9 (03-May-2021)

Bug Fixes:
* Fixed issue with path normalization when child items are empty


v 1.0.8 (21-Apr-2021)

Enhancements:
* Console log messages formatted better

Bug Fixes:
* Check for git status after files are staged to check for a commit to avoid errors


v 1.0.7 (21-Apr-2021)

Bug Fixes:
* Second try to fix bug for console output redirect when displaying progress
* Inner exception stack trace shown for better troubleshooting


v 1.0.6 (20-Apr-2021)

Bug Fixes:
* Fixed bug for console output redirect when displaying progress

Enhancements:
* Full error stack trace shown for better troubleshooting
* Added comprehensive release notes


v 1.0.5 (19-Apr-2021)

Enhancements:
* Directory separators in relative paths are normalized to suit the environment they are run on. This assists with file and folder ignoring functionality.


v 1.0.4 (05-Mar-2021)

New features:
* Allow to pass Commandline arguments such as `fedcopy --codeCommit:enabled false`

Bug Fixes:
* Error handling for regex matches of commit ID
* Displays git staged item count


v 1.0.3 (03-Mar-2021)

New features:
* Added ability to specify an optional override config file via the commandline.


v 1.0.2 (26-Feb-2021)

Bug Fixes:
* General bug fixes and typos

Enhancements:
* Code refactoring


v 1.0.1 (25-Feb-2021)

New features:
1. Cleanup - Cleans up extraction folders based on how many should be retained. This minimizes disk space usage, but allows for file comparison if needed.
2. Cache Busting - Adds a version string query parameter to specified instances of css and js file references within master layouts and master pages. The regular expression `(\\?v=)(\\d{10})` matches a `?v=` followed by 10 digits. A replacment regex like `${{1}}{0}` will use the first group and replace the rest with the download identifier.
3. Code commit - Commits FED code with a meangingful message to the BED source code. The commit message could be customised. By default it uses the download identifier and the FED commit ID from the _redirects file in the downloaded ZIP file. The default setting is to abort fedcopy if any uncommitted files are found. Developers will need to push changes to the git repo manually.


v 1.0.0 (20-Feb-2021)

Initial release with four out seven features. Following features have been incorporated:
1. Remote Download - Downloads the release zip file from a given Netlify URL.
2. Unzip - Extracts all files to a folder with the current timestamp within `_fedcopy` folder. Deletes the zip file.
3. File Copy - Copies individual files from the extracted zip folder to a given location within the source code. Files will be overwritten.
4. Folder Copy - Copies folders recursively from the extracted zip folder to a given location within the source code. Child items can be ignored. Folders and files will be overwritten.