mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-20 15:29:28 +01:00
added function to write requirement hash to file
This commit is contained in:
parent
50236966d0
commit
64d53abd61
@ -551,6 +551,15 @@ func hasRequirementsChanges(requirementsFilePath string, requirementsHashFilePat
|
||||
return string(oldFileMD5HashBytes) != newFileMD5Hash
|
||||
}
|
||||
|
||||
func writeMD5Hash(requirementsFile string, requirementsHashFile string) error {
|
||||
newFileMD5Hash, err := helpers.GetMD5Hash(requirementsFile)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ioutil.WriteFile(requirementsHashFile, []byte(newFileMD5Hash), 0644)
|
||||
}
|
||||
|
||||
// extractCommandEnvironment unmarshalls a json string, extracts the ENV key from it and returns it as
|
||||
// []string where strings are in key=value format
|
||||
func extractCommandEnvironment(envJSON string) []string {
|
||||
|
Loading…
Reference in New Issue
Block a user