diff --git a/.dotfiles b/.dotfiles new file mode 160000 index 0000000..66a9354 --- /dev/null +++ b/.dotfiles @@ -0,0 +1 @@ +Subproject commit 66a9354e4071812a8f14e251ae99c3fa44f53cf3 diff --git a/.gitignore b/.gitignore index 3b29812..baa58f5 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ DerivedData/ .swiftpm/config/registries.json .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata .netrc +.swiftlint.yml diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..f25ffbc --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "dotfiles"] + path = .dotfiles + url = https://github.com/GetAutomaApp/dotfiles.git diff --git a/package.json b/package.json index 53de000..bde89b5 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,11 @@ "main": "index.js", "scripts": { "format": "swiftformat .", - "install:all": "npm run install:swiftformat", - "install:swiftformat": "brew install swiftformat" + "install:all": "npx npm-run-all install:swiftformat install:swiftlint config", + "install:swiftformat": "brew install swiftformat", + "install:swiftlint": "brew install swiftlint", + "config": "./.dotfiles/config.sh", + "update:submodules": "git submodule foreach --recursive 'branch=$(git remote show origin | awk \"/HEAD branch/ {print \\$NF}\"); git checkout $branch && git pull origin $branch' && CHANGED=$(git status --porcelain | grep '^ M \\.dotfiles' || true) && if [ -n \"$CHANGED\" ]; then npm run config; fi && git add . && git commit -m \"chore: update submodules\" || echo 'No changes to commit'" }, "repository": { "type": "git",