You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Please check if the PR fulfills these requirements**
- [x] The commit message follows our [guidelines](https://github.com/get-woke/woke/blob/main/CONTRIBUTING.md)
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
**What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...)
Feature
**What is the current behavior?** (You can also link to an open issue here)
Woke currently only looks at .gitignore and .wokeignore files in the current directory.
**What is the new behavior (if this is a feature change)?**
Woke will now traverse a repo and build a priority ranked list of ignore rules in exactly the same way that git does for .gitignore files at different directory levels. The tool will look for the root git directory (where the .git folder is) and use that for the root. If no root git directory is found then woke will just run with the current directory as root (still traversing children folders).
**Does this PR introduce a breaking change?** (What changes might users need to make due to this PR?)
No
**Other information**:
Addresses #98
set +e # Don't exit if finding version fails - will handle gracefully
161
+
cli_version_suffix="=$(apt-cache madison ${cli_package_name}| awk -F"|"'{print $2}'| sed -e 's/^[ \t]*//'| grep -E -m 1 "${docker_version_regex}")"
162
+
set -e
163
+
if [ -z"${cli_version_suffix}" ] || [ "${cli_version_suffix}"="=" ];then
164
+
echo"(!) No full or partial Docker / Moby version match found for \"${DOCKER_VERSION}\" on OS ${ID}${VERSION_CODENAME} (${architecture}). Available versions:"
165
+
apt-cache madison ${cli_package_name}| awk -F"|"'{print $2}'| grep -oP '^(.+:)?\K.+'
166
+
exit 1
167
+
fi
168
+
echo"cli_version_suffix ${cli_version_suffix}"
60
169
fi
61
170
62
171
# Install Docker / Moby CLI if not already installed
63
172
iftype docker > /dev/null 2>&1;then
64
173
echo"Docker / Moby CLI already installed."
65
174
else
66
-
# Source /etc/os-release to get OS info
67
-
. /etc/os-release
68
175
if [ "${USE_MOBY}"="true" ];then
69
-
# Import key safely (new 'signed-by' method rather than deprecated apt-key approach) and install
apt-get -y install --no-install-recommends moby-compose ||echo"(*) Package moby-compose (Docker Compose v2) not available for OS ${ID}${VERSION_CODENAME} (${architecture}). Skipping."
74
178
else
75
-
# Import key safely (new 'signed-by' method rather than deprecated apt-key approach) and install
Copy file name to clipboardExpand all lines: docs/ignore.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,3 +74,27 @@ func main() {
74
74
fmt.Println("and here is the blacklist")
75
75
}
76
76
```
77
+
78
+
## Nested Ignore Files
79
+
80
+
`woke`will apply ignore rules from nested ignore files to any child files/folders, similar to a nested `.gitignore` file. Nested ignore files work for any ignore file type listed above.
81
+
82
+
```txt
83
+
project
84
+
│ README.md
85
+
│ .wokeignore (applies to whole project)
86
+
│
87
+
└───folder1
88
+
│ │ file011.txt
89
+
│ │ file012.txt
90
+
│ │ .wokeignore (applies to file011.txt, file012.txt, and subfolder1)
0 commit comments