mirror of
https://github.com/bettercap/bettercap
synced 2025-08-21 05:53:20 -07:00
balls
This commit is contained in:
parent
6c4a13b5bc
commit
d68c1de73a
2 changed files with 36 additions and 18 deletions
27
Makefile
27
Makefile
|
@ -1,4 +1,6 @@
|
||||||
TARGET=bettercap-ng
|
TARGET=bettercap-ng
|
||||||
|
TO_UPDATE=core/banner.go
|
||||||
|
CURRENT_VERSION=$(shell cat core/banner.go | grep Version | cut -d '"' -f 2)
|
||||||
|
|
||||||
all: fmt vet build
|
all: fmt vet build
|
||||||
@echo "@ Done"
|
@echo "@ Done"
|
||||||
|
@ -10,36 +12,22 @@ build: resources
|
||||||
@echo "@ Building ..."
|
@echo "@ Building ..."
|
||||||
@go build $(FLAGS) -o $(TARGET) .
|
@go build $(FLAGS) -o $(TARGET) .
|
||||||
|
|
||||||
resources:
|
resources: oui
|
||||||
@echo "@ Compiling resources into go files ..."
|
|
||||||
|
oui:
|
||||||
@$(GOPATH)/bin/go-bindata -o net/oui_compiled.go -pkg net net/oui.dat
|
@$(GOPATH)/bin/go-bindata -o net/oui_compiled.go -pkg net net/oui.dat
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
@echo "@ Running VET ..."
|
|
||||||
@go vet ./...
|
@go vet ./...
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@echo "@ Formatting ..."
|
|
||||||
@go fmt ./...
|
@go fmt ./...
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
@echo "@ Running LINT ..."
|
|
||||||
@golint ./...
|
@golint ./...
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
@echo "@ Installing dependencies ..."
|
@go get ./...
|
||||||
@go get -u github.com/jteeuwen/go-bindata/...
|
|
||||||
@go get github.com/elazarl/goproxy
|
|
||||||
@go get github.com/google/gopacket
|
|
||||||
@go get github.com/mdlayher/dhcp6
|
|
||||||
@go get github.com/malfunkt/iprange
|
|
||||||
@go get github.com/rogpeppe/go-charset/charset
|
|
||||||
@go get github.com/chzyer/readline
|
|
||||||
@go get github.com/robertkrimen/otto
|
|
||||||
@go get github.com/dustin/go-humanize
|
|
||||||
@go get github.com/olekukonko/tablewriter
|
|
||||||
@go get github.com/gin-gonic/gin
|
|
||||||
@go get gopkg.in/unrolled/secure.v1
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf $(TARGET) net/oui_compiled.go
|
@rm -rf $(TARGET) net/oui_compiled.go
|
||||||
|
@ -49,3 +37,6 @@ clear_arp:
|
||||||
|
|
||||||
bcast_ping:
|
bcast_ping:
|
||||||
@ping -b 255.255.255.255
|
@ping -b 255.255.255.255
|
||||||
|
|
||||||
|
release:
|
||||||
|
@./new_release.sh
|
||||||
|
|
27
new_release.sh
Executable file
27
new_release.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# nothing to see here, just a utility i use to create new releases ^_^
|
||||||
|
|
||||||
|
CURRENT_VERSION=$(cat core/banner.go | grep Version | cut -d '"' -f 2)
|
||||||
|
TO_UPDATE=(
|
||||||
|
core/banner.go
|
||||||
|
)
|
||||||
|
|
||||||
|
echo -n "Current version is $CURRENT_VERSION, select new version: "
|
||||||
|
read NEW_VERSION
|
||||||
|
echo "Creating version $NEW_VERSION ...\n"
|
||||||
|
|
||||||
|
for file in "${TO_UPDATE[@]}"
|
||||||
|
do
|
||||||
|
echo "Patching $file ..."
|
||||||
|
sed -i "s/$CURRENT_VERSION/$NEW_VERSION/g" $file
|
||||||
|
git add $file
|
||||||
|
done
|
||||||
|
|
||||||
|
git commit -m "Releasing v$NEW_VERSION"
|
||||||
|
git push
|
||||||
|
|
||||||
|
git tag -a v$NEW_VERSION -m "Release v$NEW_VERSION"
|
||||||
|
git push origin v$NEW_VERSION
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "All done, v$NEW_VERSION released ^_^"
|
Loading…
Add table
Add a link
Reference in a new issue