Skip to content

Commit 0159635

Browse files
Update codeql-analysis.yml
1 parent 144ea8f commit 0159635

File tree

1 file changed

+1
-172
lines changed

1 file changed

+1
-172
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 172 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v3
1515
with:
16-
# This ensures proper line endings
1716
fetch-depth: 0
1817

1918
- name: Set Git line endings
@@ -29,185 +28,15 @@ jobs:
2928

3029
- name: Fix gradlew permissions
3130
run: |
32-
# Remove the existing gradlew file
33-
rm gradlew
34-
# Create new gradlew file with proper line endings
35-
echo '#!/usr/bin/env bash' > gradlew
36-
cat >> gradlew << 'EOL'
37-
##############################################################################
38-
##
39-
## Gradle start up script for UN*X
40-
##
41-
##############################################################################
42-
43-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
44-
DEFAULT_JVM_OPTS=""
45-
46-
APP_NAME="Gradle"
47-
APP_BASE_NAME=`basename "$0"`
48-
49-
# Use the maximum available, or set MAX_FD != -1 to use that value.
50-
MAX_FD="maximum"
51-
52-
warn ( ) {
53-
echo "$*"
54-
}
55-
56-
die ( ) {
57-
echo
58-
echo "$*"
59-
echo
60-
exit 1
61-
}
62-
63-
# OS specific support (must be 'true' or 'false').
64-
cygwin=false
65-
msys=false
66-
darwin=false
67-
case "`uname`" in
68-
CYGWIN* )
69-
cygwin=true
70-
;;
71-
Darwin* )
72-
darwin=true
73-
;;
74-
MINGW* )
75-
msys=true
76-
;;
77-
esac
78-
79-
# For Cygwin, ensure paths are in UNIX format before anything is touched.
80-
if $cygwin ; then
81-
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
82-
fi
83-
84-
# Attempt to set APP_HOME
85-
# Resolve links: $0 may be a link
86-
PRG="$0"
87-
# Need this for relative symlinks.
88-
while [ -h "$PRG" ] ; do
89-
ls=`ls -ld "$PRG"`
90-
link=`expr "$ls" : '.*-> \(.*\)$'`
91-
if expr "$link" : '/.*' > /dev/null; then
92-
PRG="$link"
93-
else
94-
PRG=`dirname "$PRG"`"/$link"
95-
fi
96-
done
97-
SAVED="`pwd`"
98-
cd "`dirname \"$PRG\"`/" >&-
99-
APP_HOME="`pwd -P`"
100-
cd "$SAVED" >&-
101-
102-
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
103-
104-
# Determine the Java command to use to start the JVM.
105-
if [ -n "$JAVA_HOME" ] ; then
106-
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
107-
# IBM's JDK on AIX uses strange locations for the executables
108-
JAVACMD="$JAVA_HOME/jre/sh/java"
109-
else
110-
JAVACMD="$JAVA_HOME/bin/java"
111-
fi
112-
if [ ! -x "$JAVACMD" ] ; then
113-
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
114-
115-
Please set the JAVA_HOME variable in your environment to match the
116-
location of your Java installation."
117-
fi
118-
else
119-
JAVACMD="java"
120-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
121-
122-
Please set the JAVA_HOME variable in your environment to match the
123-
location of your Java installation."
124-
fi
125-
126-
# Increase the maximum file descriptors if we can.
127-
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
128-
MAX_FD_LIMIT=`ulimit -H -n`
129-
if [ $? -eq 0 ] ; then
130-
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
131-
MAX_FD="$MAX_FD_LIMIT"
132-
fi
133-
ulimit -n $MAX_FD
134-
if [ $? -ne 0 ] ; then
135-
warn "Could not set maximum file descriptor limit: $MAX_FD"
136-
fi
137-
else
138-
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
139-
fi
140-
fi
141-
142-
# For Darwin, add options to specify how the application appears in the dock
143-
if $darwin; then
144-
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
145-
fi
146-
147-
# For Cygwin, switch paths to Windows format before running java
148-
if $cygwin ; then
149-
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
150-
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
151-
152-
# We build the pattern for arguments to be converted via cygpath
153-
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
154-
SEP=""
155-
for dir in $ROOTDIRSRAW ; do
156-
ROOTDIRS="$ROOTDIRS$SEP$dir"
157-
SEP="|"
158-
done
159-
OURCYGPATTERN="(^($ROOTDIRS))"
160-
# Add a user-defined pattern to the cygpath arguments
161-
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
162-
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
163-
fi
164-
# Now convert the arguments - kludge to limit ourselves to /bin/sh
165-
i=0
166-
for arg in "$@" ; do
167-
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
168-
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
169-
170-
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
171-
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
172-
else
173-
eval `echo args$i`="\"$arg\""
174-
fi
175-
i=$((i+1))
176-
done
177-
case $i in
178-
(0) set -- ;;
179-
(1) set -- "$args0" ;;
180-
(2) set -- "$args0" "$args1" ;;
181-
(3) set -- "$args0" "$args1" "$args2" ;;
182-
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
183-
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
184-
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
185-
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
186-
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
187-
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
188-
esac
189-
fi
190-
191-
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
192-
function splitJvmOpts() {
193-
JVM_OPTS=("$@")
194-
}
195-
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
196-
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
197-
198-
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
199-
EOL
200-
# Set proper permissions
20131
chmod +x gradlew
202-
# Verify file contents and permissions
20332
ls -l gradlew
20433
file gradlew
20534
20635
- name: Build with Gradle
20736
run: ./gradlew build
20837

20938
- name: Upload artifacts
210-
uses: actions/upload-artifact@v3
39+
uses: actions/upload-artifact@v4 # Updated from v3 to v4
21140
with:
21241
name: Package
21342
path: build/libs

0 commit comments

Comments
 (0)