From de4e90a70f6253435e6613e494c2b18fc11ccce2 Mon Sep 17 00:00:00 2001 From: Iovesophy <15680172+Iovesophy@users.noreply.github.com> Date: Sun, 28 Jul 2024 22:43:34 +0900 Subject: [PATCH 1/5] ADD: separate macos and windows dotfiles setting file --- Makefile => macos/Makefile | 0 gitconfig_addon => macos/gitconfig_addon | 0 install_playbook.yml => macos/install_playbook.yml | 0 {inventory => macos/inventory}/localhost.ini | 0 {roles => macos/roles}/dmg/tasks/check.yml | 0 {roles => macos/roles}/dmg/tasks/install.yml | 0 {roles => macos/roles}/dmg/tasks/main.yml | 0 {roles => macos/roles}/dmg/vars/main.yml | 0 {roles => macos/roles}/homebrew/tasks/main.yml | 0 {roles => macos/roles}/homebrew/vars/main.yml | 0 {roles => macos/roles}/lima/tasks/lima.yml | 0 {roles => macos/roles}/lima/tasks/main.yml | 0 {roles => macos/roles}/vim/tasks/main.yml | 0 {roles => macos/roles}/vim/tasks/vim-plug.yml | 0 setup.sh => macos/setup.sh | 0 {tools => macos/tools}/install_ansible.sh | 0 vimrc => macos/vimrc | 0 zshrc => macos/zshrc | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename Makefile => macos/Makefile (100%) rename gitconfig_addon => macos/gitconfig_addon (100%) rename install_playbook.yml => macos/install_playbook.yml (100%) rename {inventory => macos/inventory}/localhost.ini (100%) rename {roles => macos/roles}/dmg/tasks/check.yml (100%) rename {roles => macos/roles}/dmg/tasks/install.yml (100%) rename {roles => macos/roles}/dmg/tasks/main.yml (100%) rename {roles => macos/roles}/dmg/vars/main.yml (100%) rename {roles => macos/roles}/homebrew/tasks/main.yml (100%) rename {roles => macos/roles}/homebrew/vars/main.yml (100%) rename {roles => macos/roles}/lima/tasks/lima.yml (100%) rename {roles => macos/roles}/lima/tasks/main.yml (100%) rename {roles => macos/roles}/vim/tasks/main.yml (100%) rename {roles => macos/roles}/vim/tasks/vim-plug.yml (100%) rename setup.sh => macos/setup.sh (100%) mode change 100755 => 100644 rename {tools => macos/tools}/install_ansible.sh (100%) mode change 100755 => 100644 rename vimrc => macos/vimrc (100%) rename zshrc => macos/zshrc (100%) diff --git a/Makefile b/macos/Makefile similarity index 100% rename from Makefile rename to macos/Makefile diff --git a/gitconfig_addon b/macos/gitconfig_addon similarity index 100% rename from gitconfig_addon rename to macos/gitconfig_addon diff --git a/install_playbook.yml b/macos/install_playbook.yml similarity index 100% rename from install_playbook.yml rename to macos/install_playbook.yml diff --git a/inventory/localhost.ini b/macos/inventory/localhost.ini similarity index 100% rename from inventory/localhost.ini rename to macos/inventory/localhost.ini diff --git a/roles/dmg/tasks/check.yml b/macos/roles/dmg/tasks/check.yml similarity index 100% rename from roles/dmg/tasks/check.yml rename to macos/roles/dmg/tasks/check.yml diff --git a/roles/dmg/tasks/install.yml b/macos/roles/dmg/tasks/install.yml similarity index 100% rename from roles/dmg/tasks/install.yml rename to macos/roles/dmg/tasks/install.yml diff --git a/roles/dmg/tasks/main.yml b/macos/roles/dmg/tasks/main.yml similarity index 100% rename from roles/dmg/tasks/main.yml rename to macos/roles/dmg/tasks/main.yml diff --git a/roles/dmg/vars/main.yml b/macos/roles/dmg/vars/main.yml similarity index 100% rename from roles/dmg/vars/main.yml rename to macos/roles/dmg/vars/main.yml diff --git a/roles/homebrew/tasks/main.yml b/macos/roles/homebrew/tasks/main.yml similarity index 100% rename from roles/homebrew/tasks/main.yml rename to macos/roles/homebrew/tasks/main.yml diff --git a/roles/homebrew/vars/main.yml b/macos/roles/homebrew/vars/main.yml similarity index 100% rename from roles/homebrew/vars/main.yml rename to macos/roles/homebrew/vars/main.yml diff --git a/roles/lima/tasks/lima.yml b/macos/roles/lima/tasks/lima.yml similarity index 100% rename from roles/lima/tasks/lima.yml rename to macos/roles/lima/tasks/lima.yml diff --git a/roles/lima/tasks/main.yml b/macos/roles/lima/tasks/main.yml similarity index 100% rename from roles/lima/tasks/main.yml rename to macos/roles/lima/tasks/main.yml diff --git a/roles/vim/tasks/main.yml b/macos/roles/vim/tasks/main.yml similarity index 100% rename from roles/vim/tasks/main.yml rename to macos/roles/vim/tasks/main.yml diff --git a/roles/vim/tasks/vim-plug.yml b/macos/roles/vim/tasks/vim-plug.yml similarity index 100% rename from roles/vim/tasks/vim-plug.yml rename to macos/roles/vim/tasks/vim-plug.yml diff --git a/setup.sh b/macos/setup.sh old mode 100755 new mode 100644 similarity index 100% rename from setup.sh rename to macos/setup.sh diff --git a/tools/install_ansible.sh b/macos/tools/install_ansible.sh old mode 100755 new mode 100644 similarity index 100% rename from tools/install_ansible.sh rename to macos/tools/install_ansible.sh diff --git a/vimrc b/macos/vimrc similarity index 100% rename from vimrc rename to macos/vimrc diff --git a/zshrc b/macos/zshrc similarity index 100% rename from zshrc rename to macos/zshrc From 4bdc3bd9e303623d5493ac0c6905e84ce26a8669 Mon Sep 17 00:00:00 2001 From: Iovesophy <15680172+Iovesophy@users.noreply.github.com> Date: Sun, 28 Jul 2024 22:47:04 +0900 Subject: [PATCH 2/5] FIX: macos workflows path for cicd --- .github/workflows/macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index 8f27972..6b2d014 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -12,4 +12,4 @@ jobs: - name: Checkout Repo uses: actions/checkout@v3 - name: Run - run: make + run: cd macos && make From 652e075994bdf912833d01c7a007373926f96380 Mon Sep 17 00:00:00 2001 From: Iovesophy <15680172+Iovesophy@users.noreply.github.com> Date: Mon, 29 Jul 2024 00:25:55 +0900 Subject: [PATCH 3/5] ADD: windows dotfiles configure --- README.md | 19 +++++++++++++++++++ windows/Makefile | 7 +++++++ windows/bashrc | 1 + windows/gitconfig_addon | 7 +++++++ windows/init.bat | 2 ++ windows/setup.sh | 16 ++++++++++++++++ 6 files changed, 52 insertions(+) create mode 100644 windows/Makefile create mode 100644 windows/bashrc create mode 100644 windows/gitconfig_addon create mode 100644 windows/init.bat create mode 100644 windows/setup.sh diff --git a/README.md b/README.md index 96bf7ed..5966448 100644 --- a/README.md +++ b/README.md @@ -1 +1,20 @@ # dotfiles + +## macos + +```bash +make +``` + +## windows + +When setup, you need open git bash via auth of admin!!! + +```bat +./init.bat +``` + +```bash +make NAME=`` EMAIL=`` +``` + diff --git a/windows/Makefile b/windows/Makefile new file mode 100644 index 0000000..36a72e0 --- /dev/null +++ b/windows/Makefile @@ -0,0 +1,7 @@ +NAME:= +EMAIL:= + +.PHONY: setup +setup: + ./setup.sh ${NAME} ${EMAIL} + diff --git a/windows/bashrc b/windows/bashrc new file mode 100644 index 0000000..750a1dd --- /dev/null +++ b/windows/bashrc @@ -0,0 +1 @@ +export MSYS=winsymlinks:nativestrict diff --git a/windows/gitconfig_addon b/windows/gitconfig_addon new file mode 100644 index 0000000..af241e8 --- /dev/null +++ b/windows/gitconfig_addon @@ -0,0 +1,7 @@ +[alias] + lg = log --graph --date=short --format='%C(yellow)%h%C(reset)%C(magenta) [%ad]%C(reset)%C(auto)%d%C(reset) %s%C(cyan) @%an%C(reset)' + st = status +[core] + quotepath = false +[init] + defaultBranch = main diff --git a/windows/init.bat b/windows/init.bat new file mode 100644 index 0000000..1f4b4c6 --- /dev/null +++ b/windows/init.bat @@ -0,0 +1,2 @@ +winget install Git.Git koalaman.shellcheck ezwinports.make +pause diff --git a/windows/setup.sh b/windows/setup.sh new file mode 100644 index 0000000..64ef3aa --- /dev/null +++ b/windows/setup.sh @@ -0,0 +1,16 @@ +#!/bin/bash -eux + +# region enable symlink +export MSYS=winsymlinks:nativestrict +rm -rf ~/.bashrc +ln -s "$(pwd)/bashrc" ~/.bashrc +# endregion + +# region git setting +cp -f gitconfig_addon ~/.gitconfig +git config --global core.symlinks true +git config --global user.name $1 +git config --global user.email $2 +cat ~/.gitconfig +# endregion + From b0c4110d1076b9bddf79e1b078a5acc6c3be64d9 Mon Sep 17 00:00:00 2001 From: Iovesophy <15680172+Iovesophy@users.noreply.github.com> Date: Mon, 29 Jul 2024 00:55:09 +0900 Subject: [PATCH 4/5] FIX: macos shell mode --- macos/setup.sh | 0 macos/tools/install_ansible.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 macos/setup.sh mode change 100644 => 100755 macos/tools/install_ansible.sh diff --git a/macos/setup.sh b/macos/setup.sh old mode 100644 new mode 100755 diff --git a/macos/tools/install_ansible.sh b/macos/tools/install_ansible.sh old mode 100644 new mode 100755 From 7c00c1f9d45e62c7b999abbff48710b5b7ccd567 Mon Sep 17 00:00:00 2001 From: Iovesophy <15680172+Iovesophy@users.noreply.github.com> Date: Mon, 29 Jul 2024 01:03:13 +0900 Subject: [PATCH 5/5] FIX: remove lima setting --- macos/install_playbook.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/macos/install_playbook.yml b/macos/install_playbook.yml index 75602aa..18eae26 100644 --- a/macos/install_playbook.yml +++ b/macos/install_playbook.yml @@ -7,5 +7,4 @@ roles: - homebrew - vim - - lima