refactor(scripts): replace licenses directory with symlink - #25
Merged
Conversation
Replace licenses/ directory with symlink to .legal/artagon-license/licenses to avoid file duplication and ensure automatic synchronization. Changes: - Replace licenses/ directory with symlink - Update repo_validate.sh to check for symlink - Update artagon-license submodule with export script changes Benefits: - Eliminates duplicate license files - Automatic sync with artagon-license submodule - Single source of truth for license content - Reduced repository size Closes #24
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the licenses/ directory with a symlink to .legal/artagon-license/licenses/ to eliminate duplicate license files. It also adds repository validation to ensure the symlink is properly configured and updates the artagon-license submodule reference.
- Adds
repo_validate.shscript to validate repository structure including license symlink verification - Removes duplicate license files (6 files totaling ~1580 lines)
- Creates symlink from
licensesto.legal/artagon-license/licenses
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/repo_validate.sh | New validation script that checks for proper license symlink configuration |
| licenses/* | Removed duplicate license files (LICENSE-AGPL.txt, LICENSE-COMMERCIAL.txt, LICENSING.md, CLA.md, CLA-CORPORATE.md, SOURCE-FILE-HEADER.txt, TRADEMARK-POLICY.md) |
| licenses | Created as symlink pointing to .legal/artagon-license/licenses |
| .legal/artagon-license | Updated submodule reference |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Multiple improvements to repository setup and validation scripts: repo_setup.sh: - Add --build-system flag for C/C++ projects (cmake|bazel) - Fix Nix submodule handling to support both SSH and HTTPS protocols - Add protocol fallback when adding artagon-nix submodule - Fix heredoc quoting in README generation repo_validate.sh: - Fix directory detection to only search existing src/include dirs - Prevent errors when directories don't exist - Use safer find command with conditional directory list tests: - Add test for --build-system flag documentation - Update arithmetic operations to use safer $((expr)) syntax - Add test_repo_validate_detection.sh for project type detection - Improve test reliability and error handling nix submodule: - Update to include flake.lock files for C and Rust templates
Update nix submodule reference to include flake.lock files for C and Rust templates, ensuring reproducible builds.
Resolved conflicts in scripts/repo_validate.sh: - Kept safer directory detection (only searches existing directories) - Kept license symlink validation (core feature of PR #25) - Used bash-style test syntax for consistency
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace
licenses/directory with a symlink to.legal/artagon-license/licenses/to eliminate duplicate files and ensure automatic synchronization with the artagon-license submodule.Problem
The
licenses/directory currently contains copied files from.legal/artagon-license/licenses/, causing:Solution
Replace the directory with a symlink:
Changes
artagon-common (this repo)
licenses/directory with symlinkscripts/repo_validate.shwith license symlink validation.legal/artagon-licensesubmodule referenceartagon-license submodule
scripts/export-license-assets.shto create symlink instead of copying filesLICENSE_FILESarray (no longer needed)Benefits
Testing
export-license-assets.shcreates symlink correctlyrepo_validate.shchecks for symlinkBackward Compatibility
✅ No breaking changes: Files remain accessible at
licenses/paths. Git tracks the symlink, not the target files.Files Changed
Closes #24