Last active
September 12, 2024 17:58
-
-
Save cognifloyd/ff9a43fc54971233384acff50c262088 to your computer and use it in GitHub Desktop.
capturing .git/modules
This file contains 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
experimental_workspace_environment( | |
name="in_repo_workspace", | |
) | |
files( | |
name="gitmodules", | |
sources=[ | |
".gitmodules", | |
"st2tests/st2tests/fixtures/packs/test_content_version/.git", | |
], | |
) | |
shell_command( | |
name="capture_git_modules", | |
environment="in_repo_workspace", | |
command="cp -r .git/modules {chroot}/.git", | |
execution_dependencies=[":gitmodules"], | |
output_dependencies=[":gitmodules"], | |
output_directories=[".git/modules"], | |
workdir="/", | |
) | |
############################################################################################# | |
# This would be in path/to/tests/unit/BUILD | |
python_tests( | |
name="tests", | |
dependencies=[ | |
"//:capture_git_modules", | |
], | |
) |
This file contains 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
# ... | |
[environments-preview.names] | |
in_repo_workspace = "//:in_repo_workspace" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment