-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathgenerate_solution_mac.sh
61 lines (49 loc) · 1.8 KB
/
generate_solution_mac.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# *** Command Line Arguments ***
# DLLOnly - Generates a solution with only DLL-related build configurations
python_prefix="Python "
python_version=$(python3 -V 2>&1)
if [[ -z "$python_version" ]]
then
echo "No Python installation found, please install Python 3.12.+ before proceeding."
exit
else
# Remove the 'Python ' prefix from the version.
version_number=${python_version#"$python_prefix"}
echo "Python version: $version_number installed."
fi
# Check if the installed Python version is >= 3.12
if ! { echo "$version_number"; echo "3.12.0"; } | sort --version-sort --check
then
# Check to see if venv exists by searching for config file.
venv_file="./venv/pyvenv.cfg"
# If no venv config file found create a venv.
if [ ! -f "$venv_file" ]
then
echo "Virtual evironment does not exist, creating now..."
mkdir ./venv
python3 -m venv ./venv
fi
echo "Activating virtual evironment."
source ./venv/bin/activate
fi
python3 -m pip install -r teamcity/requirements.txt
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
XCODE_VERSION=$(softwareupdate --history | awk '/Command Line Tools for Xcode/ {print $6}' | tail -1)
cd "${DIR}"
git config core.hooksPath .githooks
git config commit.template .githooks/commit-template.txt
if [ ! -f ./modules/premake/README.md ]
then
git submodule update --recursive
fi
if [ ! -f /modules/premake/bin/release/premake5 ]
then
mkdir -p ./modules/premake/bin/release/
cd ./modules/premake/bin/release/
curl -O -L https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-macosx.tar.gz
tar -xzvf premake-5.0.0-beta2-macosx.tar.gz
rm premake-5.0.0-beta2-macosx.tar.gz
cd ../../../..
fi
./modules/premake/bin/release/premake5 --os=macosx xcode4 "$@"