direct git link
This commit is contained in:
parent
cd04389146
commit
767f48236c
47
.github/workflows/symlink-test.yml
vendored
47
.github/workflows/symlink-test.yml
vendored
|
@ -41,21 +41,40 @@ jobs:
|
|||
# symlink via pwsh
|
||||
# this creates a 'bang' file that contains 'duh'
|
||||
# on local machine, it fails 'New-Item: Administrator privilege required for this operation.'
|
||||
- name: Symlink Pwsh
|
||||
shell: pwsh
|
||||
#
|
||||
# update: it creates *something* that is listed as a directory in the log,
|
||||
# and that GitHub represents as a link, so it has to be a link, but when
|
||||
# I check the thing out, it's a file
|
||||
# because Windows won't create the link but on Linux, it's checked out as a link
|
||||
#
|
||||
#- name: Symlink Pwsh
|
||||
# shell: pwsh
|
||||
# run: |
|
||||
# if (! (test-path bang)) {
|
||||
# New-Item -ItemType SymbolicLink -Name bang -Target duh
|
||||
# write-output "DIR:"
|
||||
# ls .
|
||||
# write-output "DIR:"
|
||||
# ls bang
|
||||
# git config --global user.email "stephan@REDACTED.com"
|
||||
# git config --global user.name "Stephan"
|
||||
# git config --global core.symlinks "true"
|
||||
# git add bang
|
||||
# git commit -m "created symlink"
|
||||
# }
|
||||
|
||||
# see
|
||||
# this just creates the symlink in Git - works on Windows
|
||||
# BUT will be checked out as a file and we don't care
|
||||
- name: Symlink Git
|
||||
shell: bash
|
||||
run: |
|
||||
if (! (test-path bang)) {
|
||||
New-Item -ItemType SymbolicLink -Name bang -Target duh
|
||||
write-output "DIR:"
|
||||
ls .
|
||||
write-output "DIR:"
|
||||
ls bang
|
||||
git config --global user.email "stephan@REDACTED.com"
|
||||
git config --global user.name "Stephan"
|
||||
git config --global core.symlinks "true"
|
||||
git add bang
|
||||
git commit -m "created symlink"
|
||||
}
|
||||
if [ -f "bang" ]; then rm -f bang; fi
|
||||
git update-index --add --cacheinfo 120000 "$(echo "duh" | git hash-object -w --stdin)" "bang"
|
||||
git config --global user.email "stephan@REDACTED.com"
|
||||
git config --global user.name "Stephan"
|
||||
git add bang
|
||||
git commit -m "created symlink"
|
||||
|
||||
# push changes back
|
||||
- name: Push
|
||||
|
|
Loading…
Reference in New Issue
Block a user