Select Git revision
-
Marcel Nellesen authoredMarcel Nellesen authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
PowerShellUtil.cs 1.00 KiB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Coscine.Action.Utils
{
public class PowerShellUtil
{
public static string GetTemplatesScript(string tempDirectory)
{
return @"$extractPath = 'C:\Programs\Consul\'
$fileName = 'Consul.exe'
$fullPath = ($extractPath + $fileName)
$tempDirectory = '{{tempDirectory}}'
$gitlab_token = & $fullPath kv get 'coscine/global/gitlabtoken'
git clone https://gitlab-ci-token:$gitlab_token@git.rwth-aachen.de/coscine/backend/sharepoint/templates.git $tempDirectory
cd $tempDirectory
$pagebranch = & $fullPath kv get 'coscine/local/sharepoint/pagebranch'
if (!$pagebranch) {
$pagebranch = 'master';
}
git checkout $pagebranch".Replace("{{tempDirectory}}", tempDirectory);
}
}
}