You've already forked gnatstudio
mirror of
https://github.com/AdaCore/gnatstudio.git
synced 2026-02-12 12:42:33 -08:00
18 lines
498 B
Python
18 lines
498 B
Python
# This script automatically assigns the scenario variable "target" upon
|
|
# assignment of the build server.
|
|
|
|
import GPS
|
|
|
|
my_linux_server_nickname = "foo"
|
|
|
|
|
|
def server_changed(hook, server_type, nickname):
|
|
if server_type == "BUILD_SERVER":
|
|
if nickname == "my_linux_server_nickname":
|
|
GPS.Project.set_scenario_variable("target", "Linux-remote")
|
|
else:
|
|
GPS.Project.set_scenario_variable("target", "Windows")
|
|
|
|
|
|
GPS.Hook("server_config_hook").add(server_changed)
|