2022-05-05 21:42:31 +05:30
|
|
|
#!/bin/bash
|
|
|
|
|
|
2022-08-18 01:11:18 +05:30
|
|
|
if [[ $1 != "true" ]] ;
|
2022-05-05 21:42:31 +05:30
|
|
|
then
|
|
|
|
|
echo "Creating a go.work file"
|
|
|
|
|
|
2023-01-23 12:43:56 +05:30
|
|
|
txt="go 1.19\n\nuse ./\n"
|
2022-06-23 07:55:50 -04:00
|
|
|
|
|
|
|
|
if [ "$BUILD_ENTERPRISE_READY" == "true" ]
|
|
|
|
|
then
|
2023-02-28 17:42:28 -05:00
|
|
|
txt="${txt}use ../../enterprise\n"
|
2022-06-23 07:55:50 -04:00
|
|
|
fi
|
|
|
|
|
|
2022-12-29 15:23:09 +04:00
|
|
|
if [ "$BUILD_PLAYBOOKS" == "true" ]
|
|
|
|
|
then
|
2023-02-28 17:42:28 -05:00
|
|
|
txt="${txt}use ../../mattermost-plugin-playbooks\n"
|
2022-12-29 15:23:09 +04:00
|
|
|
fi
|
|
|
|
|
|
2023-02-28 18:53:28 -05:00
|
|
|
if [ "$USE_LOCAL_PLUGIN_API" == "true" ]
|
|
|
|
|
then
|
|
|
|
|
txt="${txt}use ../../mattermost-plugin-api\n"
|
|
|
|
|
fi
|
|
|
|
|
|
2022-06-23 07:55:50 -04:00
|
|
|
printf "$txt" > "go.work"
|
2022-12-29 15:23:09 +04:00
|
|
|
fi
|