-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0fccdb3
commit 3826c1b
Showing
4 changed files
with
112 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,107 @@ | ||
version: 2 | ||
project_name: roller | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- go mod download | ||
|
||
builds: | ||
- id: roller | ||
main: ./main.go | ||
- id: "roller-darwin" | ||
main: ./ | ||
binary: roller | ||
env: | ||
- CGO_ENABLED=0 | ||
- CGO_ENABLED=1 | ||
- CC=o64-clang | ||
- CXX=o64-clang++ | ||
goos: | ||
- linux | ||
- darwin | ||
- windows | ||
goarch: | ||
- amd64 | ||
flags: | ||
- -tags=cgo | ||
ldflags: | ||
- -X github.com/dymensionxyz/roller/version.BuildVersion={{.Version}} -X github.com/dymensionxyz/roller/version.BuildCommit={{.Commit}} -X github.com/dymensionxyz/roller/version.BuildTime={{.Date}} | ||
- id: "roller-darwin-arm64" | ||
main: ./ | ||
binary: roller | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=oa64-clang | ||
- CXX=oa64-clang++ | ||
goos: | ||
- darwin | ||
goarch: | ||
- arm64 | ||
flags: | ||
- -tags=cgo | ||
ldflags: | ||
- -X github.com/dymensionxyz/roller/version.BuildVersion={{.Version}} -X github.com/dymensionxyz/roller/version.BuildCommit={{.Commit}} -X github.com/dymensionxyz/roller/version.BuildTime={{.Date}} | ||
- id: "roller-linux" | ||
main: ./ | ||
binary: roller | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=gcc | ||
- CXX=g++ | ||
goos: | ||
- linux | ||
goarch: | ||
- amd64 | ||
flags: | ||
- -tags=cgo | ||
ldflags: | ||
- -X github.com/dymensionxyz/roller/version.BuildVersion={{.Version}} -X github.com/dymensionxyz/roller/version.BuildCommit={{.Commit}} -X github.com/dymensionxyz/roller/version.BuildTime={{.Date}} | ||
- id: "roller-linux-arm64" | ||
main: ./ | ||
binary: roller | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=aarch64-linux-gnu-gcc | ||
- CXX=aarch64-linux-gnu-g++ | ||
goos: | ||
- linux | ||
goarch: | ||
- arm64 | ||
flags: | ||
- -tags=cgo | ||
ldflags: | ||
- -X github.com/dymensionxyz/roller/version.BuildVersion={{.Version}} -X github.com/dymensionxyz/roller/version.BuildCommit={{.Commit}} -X github.com/dymensionxyz/roller/version.BuildTime={{.Date}} | ||
- id: "roller-windows" | ||
main: ./ | ||
binary: roller | ||
env: | ||
- CGO_ENABLED=1 | ||
- CC=x86_64-w64-mingw32-gcc | ||
- CXX=x86_64-w64-mingw32-g++ | ||
goos: | ||
- windows | ||
goarch: | ||
- amd64 | ||
flags: | ||
- -tags=cgo | ||
- -buildmode=exe | ||
ldflags: | ||
- -X github.com/dymensionxyz/roller/version.BuildVersion={{.Version}} -X github.com/dymensionxyz/roller/version.BuildCommit={{.Commit}} -X github.com/dymensionxyz/roller/version.BuildTime={{.Date}} | ||
|
||
archives: | ||
- name_template: '{{ .ProjectName }}_{{- title .Os }}_{{ .Arch }}' | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
builds: | ||
- roller-darwin | ||
- roller-darwin-arm64 | ||
- roller-windows | ||
- roller-linux | ||
- roller-linux-arm64 | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
changelog: | ||
use: git | ||
groups: | ||
- title: Features | ||
regexp: "^.*feat[(\\w)]*:+.*$" | ||
order: 0 | ||
- title: 'Bug fixes' | ||
regexp: "^.*fix[(\\w)]*:+.*$" | ||
order: 1 | ||
- title: Others | ||
order: 999 | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^chore:' | ||
- '^docs:' | ||
- '^test:' | ||
- '^ci:' | ||
|
||
# TODO: add azure, gcp and aws container registries as docker and docker manifest targets | ||
snapshot: | ||
name_template: "{{ .Tag }}-next" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,34 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
OS=$(uname -s | tr '[:upper:]' '[:lower:]') | ||
OS=$(uname -s) | ||
ARCH=$(uname -m) | ||
|
||
if [[ "$ARCH" == "x86_64" ]]; then | ||
ARCH="amd64" | ||
elif [[ "$ARCH" == "arm64" ]] || [[ "$ARCH" == "aarch64" ]]; then | ||
ARCH="arm64" | ||
fi | ||
API_URL="https://api.github.com/repos/dymensionxyz/roller/releases/latest" | ||
if [ -z "$ROLLER_RELEASE_TAG" ]; then | ||
TGZ_URL=$(curl -s $API_URL \ | ||
|
||
API_URL="https://api.github.com/repos/artemijspavlovs/roller/releases/latest" | ||
if [ "$ROLLER_RELEASE_TAG" = "" ]; then | ||
TGZ_URL=$(curl -s "$API_URL" \ | ||
| grep "browser_download_url.*_${OS}_${ARCH}.tar.gz" \ | ||
| cut -d : -f 2,3 \ | ||
| tr -d \" \ | ||
| tr -d ' ' ) | ||
else | ||
TGZ_URL="https://github.com/dymensionxyz/roller/releases/download/$ROLLER_RELEASE_TAG/roller_${ROLLER_RELEASE_TAG}_${OS}_${ARCH}.tar.gz" | ||
TGZ_URL="https://github.com/artemijspavlovs/roller/releases/download/$ROLLER_RELEASE_TAG/roller_${OS}_${ARCH}.tar.gz" | ||
fi | ||
INTERNAL_DIR="/usr/local/bin/roller_bins" | ||
ROLLER_BIN_PATH="/usr/local/bin/roller" | ||
DYMD_BIN_PATH="/usr/local/bin/dymd" | ||
ROLLAPP_EVM_PATH="/usr/local/bin/rollapp_evm" # The path where rollapp_evm will be installed | ||
if [ -f "$ROLLER_BIN_PATH" ] || [ -f "$ROLLAPP_EVM_PATH" ] || [ -f "$DYMD_BIN_PATH" ] || [ -d "$INTERNAL_DIR" ]; then | ||
sudo rm -f "$ROLLER_BIN_PATH" | ||
sudo rm -f "$ROLLAPP_EVM_PATH" | ||
sudo rm -f "$DYMD_BIN_PATH" | ||
sudo rm -rf "$INTERNAL_DIR" | ||
fi | ||
sudo mkdir -p "$INTERNAL_DIR" | ||
sudo mkdir -p "/tmp/roller_tmp" | ||
echo "💈 Downloading roller..." | ||
sudo curl -L "$TGZ_URL" --progress-bar | sudo tar -xz -C "/tmp/roller_tmp" | ||
echo "💈 Installing roller..." | ||
sudo mv "/tmp/roller_tmp/roller_bins/lib"/* "$INTERNAL_DIR" | ||
sudo mv "/tmp/roller_tmp/roller_bins/roller" "$ROLLER_BIN_PATH" | ||
sudo mv "/tmp/roller_tmp/roller_bins/rollapp_evm" "$ROLLAPP_EVM_PATH" | ||
sudo mv "/tmp/roller_tmp/roller_bins/dymd" "$DYMD_BIN_PATH" | ||
sudo mv "/tmp/roller_tmp/roller" "$ROLLER_BIN_PATH" | ||
sudo chmod +x "$ROLLER_BIN_PATH" | ||
sudo chmod +x "$ROLLAPP_EVM_PATH" | ||
sudo chmod +x "$DYMD_BIN_PATH" | ||
sudo rm -rf "/tmp/roller_tmp" | ||
echo "💈 Installation complete! You can now use roller from your terminal." |