Jaypore CI

> Jaypore CI: Minimal, Offline, Local CI system.
Log | Files | Refs | README | LICENSE

pull.go (382B)


      1 package jci
      2 
      3 import (
      4 	"fmt"
      5 )
      6 
      7 // Pull fetches CI results from remote
      8 func Pull(args []string) error {
      9 	remote := "origin"
     10 	if len(args) > 0 {
     11 		remote = args[0]
     12 	}
     13 
     14 	fmt.Printf("Fetching CI results from %s...\n", remote)
     15 
     16 	_, err := git("fetch", remote, "refs/jci-runs/*:refs/jci-runs/*")
     17 	if err != nil {
     18 		fmt.Printf("Warning: %v\n", err)
     19 	}
     20 
     21 	fmt.Println("Done")
     22 	return nil
     23 }