-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
42 lines (38 loc) · 1004 Bytes
/
main.go
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
// Command aggretastic-generator is used for automated managing
// https://github.com/AaHaInc/Aggretastic repository.
//
// Aggretastic-generator can update currently used,
// add new and remove deprecated aggregations
//
// All source-related operations are performed via
// high-level go/ast wrapper: pretty_dst.
//
// Aggretastic-generator can be used for tracking
// several upstreams for several Aggretastic versions.
// You can specify upstream version in conf.env file
// in your Aggretastic repo
//
package main
import (
"github.com/joho/godotenv"
"github.com/konovenschi/aggretastic-sync/olivere_v6_pipelines"
"log"
"os"
)
func main() {
err := godotenv.Load("conf.env")
if err != nil {
err = godotenv.Load("conf.env.default")
if err != nil {
log.Fatal("Error loading .env file")
return
}
}
switch os.Getenv("REPO_BRANCH") {
case "refs/heads/release-branch.v6":
olivere_v6_pipelines.Run()
default:
log.Fatal("Can't find any pipelines for this branch")
return
}
}