-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The `include_hooks_files` attribute uses SshCInclude structure that permits to define if append or prepend the list of hooks. The default behavior is `append`. Example: ```yaml include_hooks_files: - mode: prepend files: - hooks/file1.yml - hooks/file2.yml - files: - hooks/file3.yml - hooks/file4.yml ``` This commit breaks existing ABI.
- Loading branch information
Showing
7 changed files
with
115 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
Copyright © 2024 Daniele Rondina <[email protected]> | ||
See AUTHORS and LICENSE for the license details and contributors. | ||
*/ | ||
package specs | ||
|
||
const ( | ||
IncludeTypeAppend = "append" | ||
IncludeTypePrepend = "prepend" | ||
) | ||
|
||
func (i *SshCInclude) GetType() string { | ||
ans := i.Type | ||
if ans == "" { | ||
ans = IncludeTypeAppend | ||
} | ||
return ans | ||
} | ||
func (i *SshCInclude) GetFiles() []string { return i.Files } | ||
func (i *SshCInclude) IncludeInAppend() bool { | ||
if i.GetType() == IncludeTypeAppend { | ||
return true | ||
} | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters