Skip to content

Commit 590a07c

Browse files
committed
Improve GitHub build script for local debugging
1 parent 52a1b85 commit 590a07c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/build-binaries.sh

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ set -x -e
66
DEBUG=$1 # Value is '' or 'debug'
77
RUNNER_OS=$2 # ${{ runner.os }} is Linux, Windiws, maxOS
88
TAG=$3 # For master it's 23.0.999, while for tag it's the tag itself
9+
NO_REBASE=$4 # Specify this to skip the rebase over the edge branch. Used for local debugging.
10+
911
prefix=/tmp/ADALIB_DIR
1012

1113
if [ $RUNNER_OS = Windows ]; then
@@ -29,7 +31,7 @@ echo PATH=$PATH
2931
BRANCH=master
3032

3133
# Rebase PR on edge branch
32-
if [[ ${GITHUB_REF##*/} != 2*.[0-9]*.[0-9]* ]]; then
34+
if [[ -z "$NO_REBASE" && ${GITHUB_REF##*/} != 2*.[0-9]*.[0-9]* ]]; then
3335
git config user.email "`git log -1 --pretty=format:'%ae'`"
3436
git config user.name "`git log -1 --pretty=format:'%an'`"
3537
git config core.autocrlf
@@ -96,7 +98,14 @@ if [ $RUNNER_OS = macOS ]; then
9698
fi
9799

98100
if [ "$DEBUG" != "debug" ]; then
99-
ALS=`ls integration/vscode/ada/*/ada_language_server*`
101+
# Here it's better to match an exact extension rather than mathing
102+
# ada_language_server* because when running locally, the latter could match
103+
# ada_language_server.dSYM from a previous run if it exists.
104+
if [ $RUNNER_OS = Windows ]; then
105+
ALS=`ls integration/vscode/ada/*/ada_language_server.exe`
106+
else
107+
ALS=`ls integration/vscode/ada/*/ada_language_server`
108+
fi
100109
cd `dirname $ALS`
101110
ALS=`basename ${ALS}`
102111
if [ $RUNNER_OS = macOS ]; then

0 commit comments

Comments
 (0)