-
Notifications
You must be signed in to change notification settings - Fork 0
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
94172da
commit 651b2ff
Showing
7 changed files
with
101 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ARCH=arm64 | ||
PLATFORM=darwin | ||
UPNOTIFY_BINARY=target/aarch64-apple-darwin/release/upnotify |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# nfpm example configuration file | ||
# | ||
# check https://nfpm.goreleaser.com/configuration for detailed usage | ||
# | ||
name: "upnotify" | ||
arch: "${ARCH}" | ||
platform: "${PLATFORM}" | ||
version: "${VERSION}" | ||
section: "default" | ||
priority: "extra" | ||
provides: | ||
- "upnotify" | ||
maintainer: "Scott Jackson <[email protected]>" | ||
description: Tool to log to standard out when the status of a web service changes. | ||
homepage: "https://github.com/scottmmjackson/upnotify" | ||
license: "BSD 3.0" | ||
contents: | ||
- src: ${UPNOTIFY_BINARY} | ||
dst: /usr/bin/upnotify |
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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# typed: false | ||
# frozen_string_literal: true | ||
|
||
class Upnotify < Formula | ||
desc "Tool to log to standard out when the status of a web service changes." | ||
homepage "https://github.com/scottmmjackson/upnotify" | ||
version "${VERSION}" | ||
|
||
on_macos do | ||
if Hardware::CPU.intel? | ||
url "${X86_DARWIN_RELEASE_URL}" | ||
sha256 "${X86_DARWIN_RELEASE_SHA}" | ||
|
||
def install | ||
bin.install "upnotify" | ||
end | ||
end | ||
if Hardware::CPU.intel? | ||
url "${ARM64_DARWIN_RELEASE_URL}" | ||
sha256 "${ARM64_DARWIN_RELEASE_SHA}" | ||
|
||
def install | ||
bin.install "upnotify" | ||
end | ||
end | ||
end | ||
on_linux do | ||
if Hardware::CPU.arm? && Hardware::CPU.is_64_bit? | ||
url "${ARM64_LINUX_RELEASE_URL}" | ||
sha256 "${ARM64_LINUX_RELEASE_SHA}" | ||
|
||
def install | ||
bin.install "bb2todotxt" | ||
end | ||
end | ||
if Hardware::CPU.intel? | ||
url "${X86_LINUX_RELEASE_URL}" | ||
sha256 "${X86_LINUX_RELEASE_SHA}" | ||
|
||
def install | ||
bin.install "bb2todotxt" | ||
end | ||
end | ||
end | ||
|
||
test do | ||
system "#{bin}/upnotify --version" | ||
end | ||
end |
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
git tag --list --contains "$(git log -n1 --pretty='%h')" --sort -refname | head -n 1 |
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,6 +1,31 @@ | ||
target:=`rustc -vV | sed -n 's|host: ||p'` | ||
os_family:=os_family() | ||
archive_type:=if os_family == "windows" { "zip" } else { "tarball" } | ||
os:=os() | ||
arch:=arch() | ||
version:=`git tag` | ||
|
||
default: build | ||
|
||
sys-info: | ||
@echo "os_family {{os_family()}}" | ||
@echo "os {{os()}}" | ||
@echo "arch: {{arch()}}" | ||
|
||
clean: | ||
rm -rf target | ||
|
||
build: | ||
cargo build --release --target {{target}} | ||
cargo build --release --target {{target}} | ||
|
||
build-mac-m1: | ||
just target=aarch64-apple-darwin archive | ||
|
||
archive-tarball: | ||
tar czf target/{{target}}/release/upnotify-{{version}}-{{target}}.tar.gz target/{{target}}/release/upnotify | ||
|
||
archive-zip: | ||
zip target/{{target}}/release/upnotify-{{version}}-{{target}}.zip target/{{target}}/release/upnotify | ||
|
||
archive: build | ||
just archive-{{archive_type}} |
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