Skip to content

Commit

Permalink
Remove the ./ prefix from the path
Browse files Browse the repository at this point in the history
  • Loading branch information
mohanson committed Dec 8, 2024
1 parent de218fc commit d5c39f3
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
with:
go-version: '1.22'
- name: Make
run: ./cmd/develop.sh
run: cmd/develop.sh
- name: Test
run: go test -v -p 1 ./...
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
with:
go-version: '1.22'
- name: Make
run: ./cmd/release.sh
run: cmd/release.sh
- name: Push
uses: softprops/action-gh-release@v2
with:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ $ git clone https://github.com/mohanson/daze
$ cd daze

# On Linux or macOS
$ ./cmd/develop.sh
$ cmd/develop.sh
# On Windows
$ ./cmd/develop.ps1
$ cmd/develop.ps1
```

The build results will be saved in the bin directory. You can keep this directory, and all other files are not required.
Expand Down Expand Up @@ -146,7 +146,7 @@ Proxy control is a rule that determines whether network requests (TCP and UDP) g

## File rule.ls

Daze uses a "rule.ls" file to customize your own rules(optional). "rule.ls" has the highest priority in routers so you should carefully maintain it. The "rule.ls" is located on the "./rule.ls" by default, or you can use `daze client -r path/to/rule.ls` to apply it.
Daze uses a "rule.ls" file to customize your own rules(optional). "rule.ls" has the highest priority in routers so you should carefully maintain it. The "rule.ls" is located on the "rule.ls" by default, or you can use `daze client -r path/to/rule.ls` to apply it.

```text
L a.com
Expand All @@ -162,7 +162,7 @@ Glob is supported, such as `R *.google.com`.

## File rule.cidr

Daze also uses a CIDR(Classless Inter-Domain Routing) file to route addresses. The CIDR file is located at "./rule.cidr", and has a lower priority than "rule.ls".
Daze also uses a CIDR(Classless Inter-Domain Routing) file to route addresses. The CIDR file is located at "rule.cidr", and has a lower priority than "rule.ls".

By default, daze has configured rule.cidr for China's mainland. You can update it manually via `daze gen cn`, this will pull the latest data from [http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest](http://ftp.apnic.net/apnic/stats/apnic/delegated-apnic-latest).

Expand Down
12 changes: 6 additions & 6 deletions cmd/develop.ps1
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
if (!(Test-Path ./bin)) {
New-Item -Path ./bin -ItemType Directory | Out-Null
if (!(Test-Path bin)) {
New-Item -Path bin -ItemType Directory | Out-Null
}

if (!(Test-Path ./bin/rule.cidr)) {
Copy-Item ./res/rule.cidr -Destination ./bin/rule.cidr
if (!(Test-Path bin/rule.cidr)) {
Copy-Item res/rule.cidr -Destination bin/rule.cidr
}

if (!(Test-Path ./bin/rule.ls)) {
Copy-Item ./res/rule.ls -Destination ./bin/rule.ls
if (!(Test-Path bin/rule.ls)) {
Copy-Item res/rule.ls -Destination bin/rule.ls
}

& go build -o bin github.com/mohanson/daze/cmd/daze
10 changes: 5 additions & 5 deletions cmd/develop.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
set -ex

if [ ! -d ./bin ]; then
if [ ! -d bin ]; then
mkdir bin
fi

if [ ! -f ./bin/rule.cidr ]; then
cp ./res/rule.cidr ./bin/rule.cidr
if [ ! -f bin/rule.cidr ]; then
cp res/rule.cidr bin/rule.cidr
fi

if [ ! -f ./bin/rule.ls ]; then
cp ./res/rule.ls ./bin/rule.ls
if [ ! -f bin/rule.ls ]; then
cp res/rule.ls bin/rule.ls
fi

go build -o bin github.com/mohanson/daze/cmd/daze
16 changes: 8 additions & 8 deletions cmd/release.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
set -ex

rm -rf ./bin/release
mkdir -p ./bin/release
rm -rf bin/release
mkdir -p bin/release

make() {
mkdir ./bin/release/daze_$1_$2
cp ./README.md ./bin/release/daze_$1_$2/README.md
cp ./res/rule.cidr ./bin/release/daze_$1_$2/rule.cidr
cp ./res/rule.ls ./bin/release/daze_$1_$2/rule.ls
GOOS=$1 GOARCH=$2 go build -o ./bin/release/daze_$1_$2 github.com/mohanson/daze/cmd/daze
python -m zipfile -c ./bin/release/daze_$1_$2.zip ./bin/release/daze_$1_$2
mkdir bin/release/daze_$1_$2
cp README.md bin/release/daze_$1_$2/README.md
cp res/rule.cidr bin/release/daze_$1_$2/rule.cidr
cp res/rule.ls bin/release/daze_$1_$2/rule.ls
GOOS=$1 GOARCH=$2 go build -o bin/release/daze_$1_$2 github.com/mohanson/daze/cmd/daze
python -m zipfile -c bin/release/daze_$1_$2.zip bin/release/daze_$1_$2
}

# https://golang.org/doc/install/source#environment
Expand Down

0 comments on commit d5c39f3

Please sign in to comment.