83f10d2a3b
add CGO support for release build add release.sh
37 lines
No EOL
1.3 KiB
Bash
37 lines
No EOL
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
FILENAMES=$(ls)
|
|
for FILENAME in $FILENAMES
|
|
do
|
|
if [[ $FILENAME =~ "darwin-10.16-arm64" ]];then
|
|
echo "rename darwin-10.16-arm64 $FILENAME"
|
|
mv $FILENAME clash.meta-darwin-arm64-${VERSION}-${ShortSHA}
|
|
elif [[ $FILENAME =~ "darwin-10.16-amd64" ]];then
|
|
echo "rename darwin-10.16-amd64 $FILENAME"
|
|
mv $FILENAME clash.meta-darwin-amd64-${VERSION}-${ShortSHA}
|
|
elif [[ $FILENAME =~ "windows-4.0-386" ]];then
|
|
echo "rename windows 386 $FILENAME"
|
|
mv $FILENAME clash.meta-windows-386-${VERSION}-${ShortSHA}.exe
|
|
elif [[ $FILENAME =~ "windows-4.0-amd64" ]];then
|
|
echo "rename windows amd64 $FILENAME"
|
|
mv $FILENAME clash.meta-windows-amd64-${VERSION}-${ShortSHA}.exe
|
|
elif [[ $FILENAME =~ "linux" ]];then
|
|
echo "rename linux $FILENAME"
|
|
mv $FILENAME $FILENAME-${VERSION}-${ShortSHA}
|
|
elif [[ $FILENAME =~ "android" ]];then
|
|
echo "rename android $FILENAME"
|
|
mv $FILENAME $FILENAME-${VERSION}-${ShortSHA}
|
|
else echo "skip $FILENAME"
|
|
fi
|
|
done
|
|
|
|
FILENAMES=$(ls)
|
|
for FILENAME in $FILENAMES
|
|
do
|
|
if [[ ! ($FILENAME =~ ".exe" || $FILENAME =~ ".sh")]];then
|
|
gzip -S ".gz" $FILENAME
|
|
elif [[ $FILENAME =~ ".exe" ]];then
|
|
zip -m $FILENAME.zip $FILENAME
|
|
else echo "skip $FILENAME"
|
|
fi
|
|
done |