Skip to content

v0.1.0

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 05 Nov 09:03

Changelog

  • 510be52 (Fix): Add command special case of "Not needing the move step" no longer requires user to add a Trailing slash to indicate if source is a directory or file
  • 91ecf36 Add .gitignore
  • af1631f Add .go.releaser.yaml file to fine tune the releases for goreleaser github action
  • 13f234e Add Colored logs with fatih/color package. Update all Log() and VerboseLog() calls to use INFO,WARNING,ERROR,SUCCESS codes to signifiy Logging colors
  • 9232f57 Add Comments explaining things in Remove Function, And replace some code with filePathInfo helper function
  • 426d5e2 Add ConfigName global variable and switch to using filepath.Join to create file paths. And Run setup directory function on startup
  • 575bdf7 Add Error checking if more than expected arguments are provided with each subcommand
  • 9cfdc83 Add Print statements to provide some output to console about what's happening under the hood. And update error messages.
  • 0faf25f Add a Add record function to update records of symlinks to yaml file, Update .gitignore
  • 3956d44 Add a RemoveRecord function for the Remove subcommand
  • cb20197 Add a Unlink Function, to move the file to original source path, and Delete the symlinks
  • cc3bac1 Add a way to reverse link a file, For file to exist at destination, but not on source.
  • 3a5b75a Add ability to symlink given path to current directory. Add usage message, and flags
  • 29be115 Add better formatting for message outputs, Update README, Change Log Color for Updating Record message
  • 99e6c6b Add linux package binaries to goreleaser.yaml to generate .deb and .rpm packages
  • a47f073 Add the default GoReleaser.yml github action file to creates releases
  • f11f264 All Add subcommand cases are working now, Fix the HasSuffix function check, and update references
  • 8c89c93 Change AliasConfig and ExpandConfig functions to methods and update references
  • dae2601 Change Logs to be printed in Bold. and update remove command help message
  • 14f5cfb Clean up main.go and move all the logic to cmd/linksym.go and have every function return the error to main
  • 5d544bf Complete the Add subcommand functionality. Add Errors to be returned to each subcommands, that can be handled in main()
  • 75a5e55 Create A AppendToDestinationPath function to reduce repeatative code
  • 427a6bd Create AppConfig global variable. Update LoadConfig function to load configuration into global variable
  • f63bdc8 Create LICENSE
  • e4258d9 Create MoveAndLink function and Update errors for Linking logic and MoveFile function
  • a3dae68 Create Update subcommand. Updates the Init Directory and the Records names of config with new destination paths from unaliased Init_directory
  • 9eed560 Create a "source" subcommand flag, This commands will be used to link all records from the config file
  • d4f5f6f Create a -u, --update flags for Init command to call the UpdateInitDirectory function, which updates init_directory to current directory
  • 2059edf Create a Basic test structure, checking to see, how symlinks are created, getting user,config directory and ENV variables
  • 9eddb7d Create a Config package, that handles initialising a basic empty config, loading the config for use in other pacakge.
  • 9ec432d Create a Record subcommand which skips the Linking step of Add subcommand and just adds the record to .linksym.yaml
  • 6099e83 Create a Restore command, that creates symlink for one or more specified targets. Compared to creating all symlinks with source command
  • 4780bbe Create a helper function to get AbsPaths and other file info in one function call. Reduces the amount of boilerplate code
  • 26bbd82 Create a logger package, to move the Verbose output logic to one place, All println statements are replaced with Log() and VerboseLog() calls
  • 50370de Create a working Source Subcommand.
  • 30bad6f Create aliasPath and expandPath function to store records with alias like ~ and $InitWorkdingDir. And expand paths to use internally
  • 13a41f2 Create some temporary source Code for the Add Command to handle all cases for 2 args provided.
  • 015809b Create subcommands and flags package, Add flags for help, and Add subcommand for Add, Remove and Init
  • ea3ed37 Create utils.go that contains functions for checking and updating form of data, Update CurrentWorkingDirectory variable to InitDirectory
  • 6e0ace4 Create working logic for the Remove Subcommand
  • 1a8a0ed Decouple Setting Home Directory variable from SetupDirectories function
  • 830707f Fix Argument logic for subcommands and WriteConfig function call. Providing configuration variable from LoadConfig()
  • 1f5d2a5 Fix Init Subcommand issue of loading config, Now handle the Init case separately before calling LoadConfig
  • 9bf1cbc Fix Linking issue where if a directory already exist, the Add or Source command wouldn't overide it when creating the links back
  • 6390db2 Fix Remove subcommand throwing index out of range errors, Change iteration method, and update RemoveRecord function
  • 015cfa1 Fix a nil pointer deference error in filePathInfo() function, where if a file didn't exist, the IsDir check would cause an err
  • 9abc52d Fix broken init command with -u, --update flag
  • f4f4fb8 Fix error for CheckFile function calls where isDir is checked before checking if file exists
  • 5b925bf Fix issue of config file overriding previous paths with absolute path on linking.
  • 23a282d Fix issue with adding directory with Add subcommand. Move the Deleting files logic to separate function to be called at multiple places
  • 991e68b Fix the checkFile function returning an error when the file doesn't exist. Update the Add command check logic
  • 5dadeb4 Fix the issue of linksym.yaml not being return, was caused by early returns from all subcommand, now handled by returning errors
  • 6eabb34 Handle all cases for the Add Subcommand paths, Still need to be debugged and tested
  • 7d8029a Initial commit
  • 0dee310 Main.go updated for Add and Source subcommands
  • cdee95e Make all Link functions methods on a LinkPaths struct. which allows passing homeDir and initDir to link package.
  • 83712fc Make the Configpath vairable global. Create a CheckFile fucntion to checks if files exists, and return data for it
  • 7585de3 Messed up the Special case code, Don't need the revesed paths for the Link Function
  • 11f0592 Move AliasConfig() call out WriteConfig method. To allow Remove subcommand to save config after each record iternation.
  • d82880f Move AliasPath and ExpandPath functions to file.go, and Update GetFileInfo() return signature
  • 0d5e075 Move Directories setup functions to config.go, and remove utils.go
  • 75ca344 Move GetFileInfo function from cmd/helpers.go to utils package
  • ae19454 Move InitialiseConfig function to io.go. Remove testing fmt.Println calls and remove os.Exit call from Help function
  • 263536c Move Initialising config logic to init.go
  • 6c2f4cc Move Symlinking logic to linker package. Add getting working directory logic to separate function
  • a51cad7 Move everything to packages again. Make every command into methods of an Application struct. And Call functions with fields of struct
  • 132aa90 Move everything to the main package. Global variables are in main.go. split utils.go File function to file.go
  • 3fc5aa8 Move flags logic to a flags package, help avoid import cycles
  • 60e230e Move main.go to cmd/ directory
  • 75cac91 Move main.go to top level directory for now
  • 40965c5 Move some variables to a global package. Move AliasPath, ExpandPath, InitialiseHomePath, and SetupDirectory function to utils package
  • 65f2ec1 Move the Linking Log message to all Link()/Unlink() calls. Probably bad, but allow for printing Aliased paths to Logs
  • a073274 Move the Run() Logic from linksym.go to main.go again
  • 0087034 Move the subcommands logic to a separate file, and move all logic of linking from main.go to Add subcommand function
  • 2c990bf Moved Flags logic to separate package
  • e6d0d75 Parse and Hanlde error of InitFlag.Parse inside the init subcommand.
  • 214d6da Remove AddRecord function call from Link function, Adding Record should be Handled by the Add command
  • 622578c Remove Git clone installation instruction from README.md
  • b5167ea Remove Unused flags for Source, Remove and Add subcommand
  • 163aa13 Remove Unused vars, Create 4 Boolean vars to handle the switch cases, And Replace isDirectory bool with isSourceDir variable
  • fcc1311 Remove configPath as argument for Link function, and Made the config path a global variable to use throughout the project
  • 87ed06f Remove helpers.go. Update All References of variables and function calls with regards to Moving functionality to different packages
  • 45730f1 Remove os.Exit() calls from linksym.go for 0 args provided and Help flag provided. Remove Unneeded init case from subcommand switch statement
  • b4655db Remove the Init subcommand -u, --update flags. And remove UpdateInit and UpdateInitConfig functions
  • 0c904af Remove unneeded flagSet commands for Add,Remove,Init,Source,Update commands
  • b5ecd72 Replace CheckFile and Getting absolute paths calls with the helper function in Add.go
  • 0e7b345 Separate the Aliasing and UnAliasing of configuration from LoadConfig and WriteConfig functions.
  • e008dd2 Split up all subcommands logic to separate .go files for easier handling
  • 3d1dd23 Update Add command to create directories when provided with destination dir path that doesn't exist. Update Link function.
  • c1b7f85 Update Add func description and AliasPaths bool name since it can be confusing
  • 73c1fad Update Add subcommand Function calls and Returning Error logic, Reduce boilerplate code
  • 52235a1 Update Add subcommand logic of handling all different case using a Switch Statement, Needs Some Improvement
  • e88a0a2 Update Add subcommand to reduce return statements for every case. Move the AddRecord() to Add subcommand.
  • 4ba6448 Update Add subcommand to require a Update Record boolean, for Running AddRecord function call inside. Needed for Source Command Implementation
  • 0373a2b Update AddRecord and RemoveRecord functions to be methods of AppConfig struct
  • c643d95 Update AliasPath and ExpandPath function to use Global InitDirectory variable, initialised from config file with SetupDirectory()
  • 54f18fe Update Command and Function description comments throughout the project.
  • 22af4f0 Update Comments and Remove Record logic
  • 14b8295 Update Comments for All functions and Improve Error messages
  • 4283619 Update Error formatting throughout the project
  • 0dea5d9 Update GetHomeDirectory function name, Replace CheckFile function and references for GetFileInfo() calls
  • b709f5b Update Help Message
  • 1c7109b Update Help Message function to use color package and Bold/Underline formatting. Really creates a Linux utils --help page look
  • 651b4d1 Update Help message with all subcommands and using a raw string, decreasing multiple fmt.Println() calls
  • 28471ed Update Init subcommand to require config Name as argument to pass to InitialiseConfig()
  • 02b1fae Update InitialiseConfig function to call WriteConfig function instead of repeating code. Create a UpdateInitDirectory function.
  • db1f08e Update InitialiseConfig() to remove WriteConfig function call. Remove configPath argument from WriteConfig and update calls
  • 28fb926 Update Linking Functions deleteFile() function to work even if the file doesn't exist, In case the user removed the symlinks
  • 40f6f0a Update LoadConfig function to return a *AppConfig struct, and need configPath as argument. Remove global Configuration var
  • 4d019df Update Log message. Make Adding/Removing messages non-verbose Logs
  • 907c537 Update Logging function, Remove \n from all log messages, \n are now appended by the logger functions
  • 549ad00 Update README again, and update help message
  • 9d8aeed Update README, Add special Add command Note for creating regular symlinks, without moving
  • 2d69448 Update README.md
  • 383a734 Update README.md, move workflow heading to top, and add note to mackup project
  • ce10603 Update Readme with Restore command instruction, and better formatting
  • 8ce5e26 Update Remove Command prototype to handle case of multiple arguments provided
  • 11ca394 Update Remove subcommand function to take *AppConfig as argument to check records and call RemoveRecord() method on
  • 8b9fb97 Update Remove subcommand to take multiple arguments and remove each record in one go
  • 9eccb26 Update SetupDirectories and InitiasliseConfig function to fix global variable issues
  • 637818e Update SetupDirectory function to call ExpandPath() on InitDirectory separetely on run. And Update AliasPath function
  • 522aec1 Update WriteConfig function to call AliasPath function before writing config. Remove unneeded WriteConfig and AliasPath function calls
  • 74e5c1c Update WriteConfig function to take *AppConfig as argument for marshalling data into file. And update InitialiseConfig to require config path to create emtpy config
  • ce24f51 Update config package, Fix error returns, decouple the Saving config and Updating records logic, Use better Variable names
  • 8b6c244 Update configuration storing logic, now using an array of struct to store the paths and "name" extracted from path, for easier access to the records
  • d3e5e1d Update filePathInfo function to check file existence internally to remove call to CheckFile function.
  • f73bc65 Update filePathInfo function to return a struct, instead of 5 return values. Update References in Add and Remove Commands
  • c99766d Update github action for goreleaser to only target Single OS and Arch or Linux and amd64
  • 9886443 Update help command message, Add -v verbose flags and update subcommand help message
  • 03ce466 Update main.go with usage of flags, new CheckFile function and remove unneeded code
  • 4c7b366 Update module name to use lowercase command name. linksym
  • 151b0b6 Update release github action to allow manully triggering of the action
  • 954a0e0 Update the Add Subcommand switch statement AGAIN. Much cleaner code using Boolean Vars and Also commented each case clearly
  • cf7e84f Update the Add command logic for 2 passed arguments, using the new MoveAndLink function and Link function for Special Case
  • ceecf9f Update the Add subcommand logic. Use more bool flags to call the Link function
  • b936bcf Update the AliasPath and ExpandPath function definition to not loop over []string, but work with strings directly.
  • 19952b1 Update the Link function to receive isDirectory and toMvoe bool and move file checking and error handling out of function to the caller
  • 94002e7 Update variable name in linker.Link function for better clarity