-
-
Save caasig/e622b05d9a9ca62636382e20d9c8697e to your computer and use it in GitHub Desktop.
Repair symlinks in AWS codepipeline
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
version: 0.2 | |
phases: | |
pre_build: | |
commands: | |
# Hack to fix the symlinks that Codepipeline breaks | |
# Applies to .tf files that contain only 1 line | |
- for file in *.tf ; do awk 'NR==2{exit}END{exit NR!=1}' "$file" && sh -c "cat $file | xargs -I R2 ln -sf R2 $file"; done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment