1
0

direct git link

This commit is contained in:
Stephan 2021-10-19 16:53:39 +02:00
parent cd04389146
commit 767f48236c
2 changed files with 33 additions and 15 deletions

View File

@ -41,21 +41,40 @@ jobs:
# symlink via pwsh # symlink via pwsh
# this creates a 'bang' file that contains 'duh' # this creates a 'bang' file that contains 'duh'
# on local machine, it fails 'New-Item: Administrator privilege required for this operation.' # 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: | run: |
if (! (test-path bang)) { if [ -f "bang" ]; then rm -f bang; fi
New-Item -ItemType SymbolicLink -Name bang -Target duh git update-index --add --cacheinfo 120000 "$(echo "duh" | git hash-object -w --stdin)" "bang"
write-output "DIR:"
ls .
write-output "DIR:"
ls bang
git config --global user.email "stephan@REDACTED.com" git config --global user.email "stephan@REDACTED.com"
git config --global user.name "Stephan" git config --global user.name "Stephan"
git config --global core.symlinks "true"
git add bang git add bang
git commit -m "created symlink" git commit -m "created symlink"
}
# push changes back # push changes back
- name: Push - name: Push

1
bang
View File

@ -1 +0,0 @@
duh