Skip to content

Commit

Permalink
Automate building rakubrew on ARM MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickbkr committed Mar 10, 2023
1 parent ddb60a9 commit 10df00e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
4 changes: 4 additions & 0 deletions release-stuff/README.md
Expand Up @@ -33,14 +33,18 @@ Release Guide
- Click on the "manual-zip-results" job, select the "Artifacts" tab and
download the shown file.
- Unzip the file.
- The MacOS ARM build should have created a `rakubrew_macos_arm` file. Copy
that file to `macos_arm/rakubrew`.
- Add a "changes" file, do so by copying the `Changes` file to `changes` and
deleting everything except for the entries for the last release. Don't
include the version number and remove leading spaces.
- Add the
- The final directory structure should look as follows:

/2/changes
/2/perl/rakubrew
/2/macos/rakubrew
/2/macos_arm/rakubrew
/2/win/rakubrew.exe

- Upload that folder to the webserver and put it in the releases folder. Here
Expand Down
46 changes: 45 additions & 1 deletion release-stuff/trigger-manual-build.sh
@@ -1,4 +1,41 @@
#!/usr/bin/env sh
#!/usr/bin/env bash

set -o errexit
set -o pipefail

# Sourced from https://stackoverflow.com/a/29835459/1975049
rreadlink() (
target=$1 fname= targetDir= CDPATH=
{ \unalias command; \unset -f command; } >/dev/null 2>&1
[ -n "$ZSH_VERSION" ] && options[POSIX_BUILTINS]=on
while :; do
[ -L "$target" ] || [ -e "$target" ] || { command printf '%s\n' "ERROR: '$target' does not exist." >&2; return 1; }
command cd "$(command dirname -- "$target")" || exit 1
fname=$(command basename -- "$target")
[ "$fname" = '/' ] && fname=''
if [ -L "$fname" ]; then
target=$(command ls -l "$fname")
target=${target#* -> }
continue
fi
break
done
targetDir=$(command pwd -P)
if [ "$fname" = '.' ]; then
command printf '%s\n' "${targetDir%/}"
elif [ "$fname" = '..' ]; then
command printf '%s\n' "$(command dirname -- "${targetDir}")"
else
command printf '%s\n' "${targetDir%/}/$fname"
fi
)

EXEC=$(rreadlink "$0")
DIR=$(dirname -- "$EXEC")


# ============================================
# Actual script starts here

if [ $# -lt 2 ]; then
echo 'You need to pass:'
Expand All @@ -19,3 +56,10 @@ curl \
}" \
https://circleci.com/api/v2/project/gh/Raku/App-Rakubrew/pipeline

# Do the MacOS Arm build
REMOTE_PATH=/Users/administrator/repos/App-Rakubrew
ssh administrator@207.254.31.127 "\
rm $REMOTE_PATH/rakubrew;\
$REMOTE_PATH/release-stuff/build-macos.sh"

scp administrator@207.254.31.127:$REMOTE_PATH/rakubrew $DIR/../rakubrew_macos_arm

0 comments on commit 10df00e

Please sign in to comment.