diff --git a/.gitignore b/.gitignore index e7474f1..cb0b817 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,10 @@ # > the private version contains sensitive data and more detailed configurations # >> specific ignores for it are located in .git_private/info/exclude (also hardlinked to .gitignore_private) .git_private +# The previous approach were work with an alias +# alias gitpublic='git --git-dir=.git_public' +# Now the approach is to use an script that switches the desired repo to .gitignore file and .git folder + # These are common ignores for all repositories /#recycle @@ -13,4 +17,53 @@ .DS_Store Mangrana.code-workspace _deprecated -filebot/presets \ No newline at end of file +filebot/presets +# these are related with the new local git switch approach +.gitignore_public +.gitignore_private +.gitConfigBackups +.iAmPublicRepo +.iAmPrivateRepo + +############################################ +## Specific ignores for public repository ## +############################################ +filebot/desktop/config +filebot/licenses +filebot/old +filebot/xattr +homarr/bk +homarr/data +homarr/configs +ownServices/AfterDownloadCarerByFinish/config +ownServices/AfterFilebotMoveProcessor/config +ownServices/ArrModificationCapturer +ownServices/SonarrQueueFixer/config +overseerr/config +plex/config +plex_music/config +prowlarr/config +qbit/bk +qbit/config +qbit/manager/config +radarr/config +sonarr/config +tautulli/config +kometa/config +Media-Scripts + +#envs with host sensitive info +ownServices/SonarrQueueFixer/.env +plex/.env +plex_music/.env +plex/old_env +radarr/.env +sonarr/.env +filebot/desktop/.env +homarr/.env +overseerr/.env +ownServices/AfterFilebotMoveProcessor/.env +prowlarr/.env +qbit/.env +qbit/manager/.env +tautulli/.env \ No newline at end of file diff --git a/.gitignore_public b/.gitignore_public index bcdb926..cb0b817 100644 --- a/.gitignore_public +++ b/.gitignore_public @@ -1,8 +1,33 @@ -## Specific ignores for public repository ## -# Note: Always work with this repository with an alias, as follows: +# Two repositories are bound to this folder +# > the public version only expose infrastructure configuration +# >> specific ignores for it are located in .git_public/info/exclude (also hardlinked to .gitignore_public) +.git_public +# > the private version contains sensitive data and more detailed configurations +# >> specific ignores for it are located in .git_private/info/exclude (also hardlinked to .gitignore_private) +.git_private +# The previous approach were work with an alias # alias gitpublic='git --git-dir=.git_public' +# Now the approach is to use an script that switches the desired repo to .gitignore file and .git folder + +# These are common ignores for all repositories +/#recycle +/#snapshot +@eaDir +.DS_Store +Mangrana.code-workspace +_deprecated +filebot/presets +# these are related with the new local git switch approach +.gitignore_public .gitignore_private +.gitConfigBackups +.iAmPublicRepo +.iAmPrivateRepo + +############################################ +## Specific ignores for public repository ## +############################################ filebot/desktop/config filebot/licenses filebot/old @@ -24,6 +49,8 @@ qbit/manager/config radarr/config sonarr/config tautulli/config +kometa/config +Media-Scripts #envs with host sensitive info ownServices/SonarrQueueFixer/.env diff --git a/homarr/tmp_clean_instance/homarr b/homarr/tmp_clean_instance/homarr new file mode 160000 index 0000000..68ff84c --- /dev/null +++ b/homarr/tmp_clean_instance/homarr @@ -0,0 +1 @@ +Subproject commit 68ff84c85a721be274456328c1b590b30c952939 diff --git a/switchGit2PrivateRepo.sh b/switchGit2PrivateRepo.sh new file mode 100644 index 0000000..5023ae0 --- /dev/null +++ b/switchGit2PrivateRepo.sh @@ -0,0 +1,22 @@ +# backup current snapshots to .gitConfigBackups with date mark +cp .gitignore .gitConfigBackups/.gitignore_moving2Private_$(date +"%Y%m%d%H%M%S") +cp .gitignore_public .gitConfigBackups/.gitignore_public_$(date +"%Y%m%d%H%M%S") +cp .gitignore_private .gitConfigBackups/.gitignore_private_$(date +"%Y%m%d%H%M%S") +cp -r .git_public .gitConfigBackups/.git_public_$(date +"%Y%m%d%H%M%S") +cp -r .git_private .gitConfigBackups/.git_private_$(date +"%Y%m%d%H%M%S") + +# save current changes from .gitignore to .gitignore_public file +cp .gitignore .gitignore_public + +# copy .gitignore_private to .gitignore file +cp .gitignore_private .gitignore + +# remove current .git folder +rm -rf .git + +# copy .git_public to .git folder +cp -r .git_public .git + +# save current flag +touch .iAmPrivateRepo +rm .iAmPublicRepo \ No newline at end of file diff --git a/switchGit2PublicRepo.sh b/switchGit2PublicRepo.sh new file mode 100644 index 0000000..b26e2b8 --- /dev/null +++ b/switchGit2PublicRepo.sh @@ -0,0 +1,22 @@ +# backup current snapshots to .gitConfigBackups with date mark +cp .gitignore .gitConfigBackups/.gitignore_moving2Public_$(date +"%Y%m%d%H%M%S") +cp .gitignore_public .gitConfigBackups/.gitignore_public_$(date +"%Y%m%d%H%M%S") +cp .gitignore_private .gitConfigBackups/.gitignore_private_$(date +"%Y%m%d%H%M%S") +cp -r .git_public .gitConfigBackups/.git_public_$(date +"%Y%m%d%H%M%S") +cp -r .git_private .gitConfigBackups/.git_private_$(date +"%Y%m%d%H%M%S") + +# save current changes from .gitignore to .gitignore_private file +cp .gitignore .gitignore_private + +# copy .gitignore_public to .gitignore file +cp .gitignore_public .gitignore + +# remove current .git folder +rm -rf .git + +# copy .git_public to .git folder +cp -r .git_public .git + +# save current flag +touch .iAmPublicRepo +rm .iAmPrivateRepo \ No newline at end of file