Skip to content

Commit

Permalink
Add support for installing from Bina
Browse files Browse the repository at this point in the history
Closes #151
  • Loading branch information
waybackarchiver committed Mar 26, 2022
1 parent c910483 commit 45be284
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 4 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,11 +343,17 @@ jobs:
```
' >> gittaglogs.txt
- name: Update bina.jon
run: |
make bina
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: release-note
path: release-note.md
path: |
release-note.md
bina.json
- name: Download math result from build and checksum jobs
uses: actions/download-artifact@v2
Expand All @@ -362,7 +368,9 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
body_path: gittaglogs.txt
files: ${{ env.PRODUCT }}/*${{ env.PRODUCT }}*
files: |
${{ env.PRODUCT }}/*${{ env.PRODUCT }}*
bina.json
prerelease: true
draft: false

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# Dependency directories (remove the comment below to include it)
# vendor/

/bina.json
/build/binary
/build/package
/.flatpak-builder
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DEB_IMG_ARCH := amd64

.PHONY: help
help: ## show help message
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make <taraget>\n\nTargets: \033[36m\033[0m\n"} /^[$$()% 0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
@awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make <target>\n\nTargets: \033[36m\033[0m\n"} /^[$$()% 0-9a-zA-Z_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)

PLATFORM_LIST = \
darwin-amd64 \
Expand Down Expand Up @@ -184,6 +184,11 @@ submodule: ## Update Git submodule
@echo "-> Updating Git submodule..."
@git submodule update --init --recursive --remote

bina: ## Update bina.json
@echo "-> Updating bina.json"
$(eval LATEST_TAG := $(shell git describe --tags --abbrev=0 | sed 's/v//'))
sed "s#0.0.0#${LATEST_TAG}#g" bina.tpl.json > bina.json

scan: ## Scan vulnerabilities
@echo "-> Scanning vulnerabilities..."
@go list -json -m all | $(DOCKER) run --rm -i sonatypecommunity/nancy sleuth --skip-update-check
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ go get -u github.com/wabarc/wayback/cmd/wayback
From GitHub Releases:

```sh
sh <(wget https://github.com/wabarc/wayback/raw/main/install.sh -O-)
curl -fsSL https://github.com/wabarc/wayback/raw/main/install.sh | sh
```

or via [Bina](https://bina.egoist.sh/):

```sh
curl -fsSL https://bina.egoist.sh/wabarc/wayback | sh
```

Using [Snapcraft](https://snapcraft.io/wayback) (on GNU/Linux)
Expand Down
108 changes: 108 additions & 0 deletions bina.tpl.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"platforms": {
"android-arm64": {
"asset": "wayback-android-arm64-0.0.0.tar.gz",
"file": "wayback-android-arm64"
},
"darwin-amd64": {
"asset": "wayback-darwin-amd64-0.0.0.tar.gz",
"file": "wayback-darwin-amd64"
},
"darwin-arm64": {
"asset": "wayback-darwin-arm64-0.0.0.tar.gz",
"file": "wayback-darwin-arm64"
},
"dragonfly-amd64": {
"asset": "wayback-dragonfly-amd64-0.0.0.tar.gz",
"file": "wayback-dragonfly-amd64"
},
"freebsd-386": {
"asset": "wayback-freebsd-386-0.0.0.tar.gz",
"file": "wayback-freebsd-386"
},
"freebsd-amd64": {
"asset": "wayback-freebsd-amd64-0.0.0.tar.gz",
"file": "wayback-freebsd-amd64"
},
"freebsd-arm64": {
"asset": "wayback-freebsd-arm64-0.0.0.tar.gz",
"file": "wayback-freebsd-arm64"
},
"linux-386": {
"asset": "wayback-linux-386-0.0.0.tar.gz",
"file": "wayback-linux-386"
},
"linux-amd64": {
"asset": "wayback-linux-amd64-0.0.0.tar.gz",
"file": "wayback-linux-amd64"
},
"linux-arm64": {
"asset": "wayback-linux-arm64-0.0.0.tar.gz",
"file": "wayback-linux-arm64"
},
"linux-armv5": {
"asset": "wayback-linux-armv5-0.0.0.tar.gz",
"file": "wayback-linux-armv5"
},
"linux-armv6": {
"asset": "wayback-linux-armv6-0.0.0.tar.gz",
"file": "wayback-linux-armv6"
},
"linux-armv7": {
"asset": "wayback-linux-armv7-0.0.0.tar.gz",
"file": "wayback-linux-armv7"
},
"linux-mips": {
"asset": "wayback-linux-mips-softfloat-0.0.0.tar.gz",
"file": "wayback-linux-mips-hardfloat"
},
"linux-mips64": {
"asset": "wayback-linux-mips64-0.0.0.tar.gz",
"file": "wayback-linux-mips64"
},
"linux-mips64le": {
"asset": "wayback-linux-mips64le-0.0.0.tar.gz",
"file": "wayback-linux-mips64le"
},
"linux-mipsle": {
"asset": "wayback-linux-mipsle-softfloat-0.0.0.tar.gz",
"file": "wayback-linux-mipsle-hardfloat"
},
"linux-ppc64": {
"asset": "wayback-linux-ppc64-0.0.0.tar.gz",
"file": "wayback-linux-ppc64"
},
"linux-ppc64le": {
"asset": "wayback-linux-ppc64le-0.0.0.tar.gz",
"file": "wayback-linux-ppc64le"
},
"linux-s390x": {
"asset": "wayback-linux-s390x-0.0.0.tar.gz",
"file": "wayback-linux-s390x"
},
"openbsd-386": {
"asset": "wayback-openbsd-386-0.0.0.tar.gz",
"file": "wayback-openbsd-386"
},
"openbsd-amd64": {
"asset": "wayback-openbsd-amd64-0.0.0.tar.gz",
"file": "wayback-openbsd-amd64"
},
"windows-386": {
"asset": "wayback-windows-386-0.0.0.zip",
"file": "wayback-windows-386"
},
"windows-amd64": {
"asset": "wayback-windows-amd64-0.0.0.zip",
"file": "wayback-windows-amd64"
},
"windows-arm": {
"asset": "wayback-windows-arm-0.0.0.zip",
"file": "wayback-windows-arm"
},
"windows-arm64": {
"asset": "wayback-windows-arm64-0.0.0.zip",
"file": "wayback-windows-arm64"
}
}
}

0 comments on commit 45be284

Please sign in to comment.