Rename osx target to apple-darwin (#526)

This commit is contained in:
Denis Isidoro 2021-04-19 07:11:23 -03:00 committed by GitHub
parent 1039658555
commit 90de292c1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 23 deletions

View file

@ -16,7 +16,7 @@ jobs:
# This should work with only the `include`s but it currently doesn't because of this bug:
# https://github.community/t5/How-to-use-Git-and-GitHub/GitHub-Actions-Matrix-options-dont-work-as-documented/td-p/29558
target:
- x86_64-osx
- x86_64-apple-darwin
- x86_64-unknown-linux-musl
- x86_64-pc-windows-gnu
- armv7-unknown-linux-musleabihf
@ -25,7 +25,7 @@ jobs:
- aarch64-apple-ios
include:
- os: macos-latest
target: x86_64-osx
target: x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: ubuntu-latest
@ -45,7 +45,7 @@ jobs:
- uses: actions/checkout@v1
- name: Build
id: build
run: scripts/action release ${{ matrix.target }}
run: scripts/release ${{ matrix.target }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

View file

@ -14,8 +14,8 @@ gen_formula() {
sha_linux="$(sha_for_asset_on_github "$version" "x86_64-unknown-linux-musl")"
header "$sha_linux"
header "sha_for x86_64-osx..."
sha_osx="$(sha_for_asset_on_github "$version" "x86_64-osx")"
header "sha_for x86_64-apple-darwin..."
sha_osx="$(sha_for_asset_on_github "$version" "x86_64-apple-darwin")"
header "$sha_osx"
header "rb..."

View file

@ -5,7 +5,7 @@ export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
cd "$NAVI_HOME"
./scripts/action release x86_64-unknown-linux-musl
./scripts/release x86_64-unknown-linux-musl
docker run \
-e HOMEBREW_NO_AUTO_UPDATE=1 \

View file

@ -214,7 +214,7 @@ get_target() {
local target
case "$archi" in
Darwin*) target="x86_64-osx" ;;
Darwin*) target="x86_64-apple-darwin" ;;
*x86*) $is_android && target="" || target="x86_64-unknown-linux-musl" ;;
*aarch*) $is_android && target="aarch64-linux-android" || target="armv7-unknown-linux-musleabihf" ;;
*arm*) $is_android && target="armv7-linux-androideabi" || target="armv7-unknown-linux-musleabihf" ;;

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euo pipefail
##? action release
##? release
export NAVI_HOME="$(cd "$(dirname "$0")/.." && pwd)"
source "${NAVI_HOME}/scripts/install"
@ -22,19 +22,13 @@ get_env_target() {
fi
}
as_cross_target() {
echo "$1" | sed "s/osx/apple-darwin/g"
}
_tap() {
echoerr "$@"
"$@"
}
release() {
local -r target="${1:-}"
echoerr "target: $target"
local -r cross_target="$(as_cross_target "$target")"
local -r cross_target="${1:-}"
echoerr "cross_target: $cross_target"
TAR_DIR="${NAVI_HOME}/target/tar"
@ -63,7 +57,7 @@ release() {
_ls "${bin_folder}"
if is_windows "$target"; then
if is_windows "$cross_target"; then
local -r exe_ext=".exe"
use_zip=true
else
@ -97,10 +91,4 @@ _ls() {
ls -la "$@" || true
}
cmd="$1"
shift
case "$cmd" in
"release") release "$@" ;;
*) exit 2 ;;
esac
release "$@"