Compare commits
8 Commits
6db5f73bc0
...
v0.9.1
Author | SHA1 | Date | |
---|---|---|---|
80a45cd595 | |||
551c8ad441 | |||
3823b1bf44 | |||
f777c78aad | |||
bb693dbb97 | |||
7beda281e0 | |||
1143d2850b | |||
8900bd70a4 |
@ -1,3 +0,0 @@
|
||||
kind: Added
|
||||
body: '`list` command with subcommands `cmds` and `lists`'
|
||||
time: 2025-02-20T14:45:49.562361581-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Added
|
||||
body: Deprecation and unsupported warnings for old config keys
|
||||
time: 2025-02-20T14:50:14.048452348-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Added
|
||||
body: CLI flag `--cmdStdOut` to output command's stdout/stderr to stdout
|
||||
time: 2025-02-20T14:52:45.030582408-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Added
|
||||
body: Command type `remoteScript`. See docs for more info.
|
||||
time: 2025-02-21T00:30:12.276616792-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Changed
|
||||
body: change to enums for Command type
|
||||
time: 2025-02-23T15:30:12.033359922-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Changed
|
||||
body: Cache now stores resources by URL hash for ease-of-lookup
|
||||
time: 2025-02-23T15:33:05.33444642-06:00
|
@ -1,3 +0,0 @@
|
||||
kind: Fixed
|
||||
body: Local command's `dir` full path is now found with home directory
|
||||
time: 2025-02-20T14:48:43.475300515-06:00
|
12
.changes/v0.9.0.md
Normal file
12
.changes/v0.9.0.md
Normal file
@ -0,0 +1,12 @@
|
||||
## v0.9.0 - 2025-02-28
|
||||
### Added
|
||||
* `list` command with subcommands `cmds` and `lists`
|
||||
* Deprecation and unsupported warnings for old config keys
|
||||
* CLI flag `--cmdStdOut` to output command's stdout/stderr to stdout
|
||||
* Command type `remoteScript`. See docs for more info.
|
||||
### Changed
|
||||
* change to enums for Command type
|
||||
* Cache now stores resources by URL hash for ease-of-lookup
|
||||
* Changed PackageOperation to enums
|
||||
### Fixed
|
||||
* Local command's `dir` full path is now found with home directory
|
3
.changes/v0.9.1.md
Normal file
3
.changes/v0.9.1.md
Normal file
@ -0,0 +1,3 @@
|
||||
## v0.9.1 - 2025-03-01
|
||||
### Changed
|
||||
* Use EnvVar AWS_PROFILE to get S3 profile
|
17
CHANGELOG.md
17
CHANGELOG.md
@ -6,6 +6,23 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
|
||||
and is generated by [Changie](https://github.com/miniscruff/changie).
|
||||
|
||||
|
||||
## v0.9.1 - 2025-03-01
|
||||
### Changed
|
||||
* Use EnvVar AWS_PROFILE to get S3 profile
|
||||
|
||||
## v0.9.0 - 2025-02-28
|
||||
### Added
|
||||
* `list` command with subcommands `cmds` and `lists`
|
||||
* Deprecation and unsupported warnings for old config keys
|
||||
* CLI flag `--cmdStdOut` to output command's stdout/stderr to stdout
|
||||
* Command type `remoteScript`. See docs for more info.
|
||||
### Changed
|
||||
* change to enums for Command type
|
||||
* Cache now stores resources by URL hash for ease-of-lookup
|
||||
* Changed PackageOperation to enums
|
||||
### Fixed
|
||||
* Local command's `dir` full path is now found with home directory
|
||||
|
||||
## v0.8.0 - 2025-02-15
|
||||
### Changed
|
||||
* Breaking: `cmd-lists` key changed to `cmdLists`
|
||||
|
@ -7,8 +7,11 @@
|
||||
],
|
||||
"settings": {
|
||||
"cSpell.words": [
|
||||
"Autorestic",
|
||||
"changie",
|
||||
"Cmds",
|
||||
"CMDSTDOUT",
|
||||
"goreleaser",
|
||||
"knadh",
|
||||
"koanf",
|
||||
"mattn",
|
||||
|
@ -18,7 +18,11 @@ var (
|
||||
func cron(cmd *cobra.Command, args []string) {
|
||||
parseS3Config()
|
||||
|
||||
opts := backy.NewOpts(cfgFile, backy.EnableCron(), backy.SetLogFile(logFile), backy.SetCmdStdOut(cmdStdOut))
|
||||
opts := backy.NewOpts(cfgFile,
|
||||
backy.EnableCron(),
|
||||
backy.SetLogFile(logFile),
|
||||
backy.SetCmdStdOut(cmdStdOut))
|
||||
|
||||
opts.InitConfig()
|
||||
opts.ReadConfig()
|
||||
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
const versionStr = "0.8.0"
|
||||
const versionStr = "0.9.1"
|
||||
|
||||
var (
|
||||
versionCmd = &cobra.Command{
|
||||
|
@ -12,6 +12,10 @@ For the main config file to be fetched remotely, pass the URL using `-f [url]`.
|
||||
|
||||
If using S3, you should use the s3 protocol URI: `s3://bucketName/key/path`. You will also need to set the env variable `S3_ENDPOINT` to the appropriate value. The flag `--s3-endpoint` can be used to override this value or to set this value, if not already set.
|
||||
|
||||
## Authentication
|
||||
|
||||
Currently, only the AWS authentication credentials file `~/.aws/credentials` is supported. For now, the environment variable `AWS_PROFILE` is used to lookup the profile.
|
||||
|
||||
## Scripts
|
||||
|
||||
Remote script support is currently limited to http/https endpoints.
|
118
getCommandHelp
118
getCommandHelp
@ -1,79 +1,83 @@
|
||||
#!/bin/bash
|
||||
CLI_PAGE="docs/content/cli/_index.md"
|
||||
|
||||
BACKYCOMMAND="go run backy.go"
|
||||
|
||||
{
|
||||
echo "---
|
||||
title: "CLI"
|
||||
title: CLI
|
||||
weight: 4
|
||||
---
|
||||
|
||||
This page lists documentation for the CLI.
|
||||
" > _index.md
|
||||
"
|
||||
|
||||
BACKYCOMMAND="go run backy.go"
|
||||
|
||||
echo "## Backy " >> _index.md
|
||||
echo " " >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo " " >> _index.md
|
||||
echo "## Backy "
|
||||
echo " "
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} -h"
|
||||
echo "\`\`\`"
|
||||
echo " "
|
||||
|
||||
|
||||
echo "# Subcommands" >> _index.md
|
||||
echo "" >> _index.md
|
||||
|
||||
echo "## backup" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} backup -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "# Subcommands"
|
||||
echo ""
|
||||
|
||||
echo "## cron" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} cron -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "## backup"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} backup -h"
|
||||
echo "\`\`\`"
|
||||
echo ""
|
||||
|
||||
echo "## exec" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} exec -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "## cron"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} cron -h"
|
||||
echo "\`\`\`"
|
||||
echo ""
|
||||
|
||||
echo "### exec host" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} exec host -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "## exec"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} exec -h"
|
||||
echo "\`\`\`"
|
||||
echo ""
|
||||
|
||||
echo "### exec host"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} exec host -h"
|
||||
echo "\`\`\`"
|
||||
echo ""
|
||||
|
||||
|
||||
echo "## version" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} version -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "## version"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} version -h"
|
||||
echo "\`\`\`"
|
||||
echo ""
|
||||
|
||||
echo "## list" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} list -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo "## list"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} list -h"
|
||||
echo "\`\`\`"
|
||||
|
||||
echo "## list cmds" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} list cmds -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo "## list cmds"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} list cmds -h"
|
||||
echo "\`\`\`"
|
||||
|
||||
echo "## list lists" >> _index.md
|
||||
echo "" >> _index.md
|
||||
echo "\`\`\`" >> _index.md
|
||||
eval "${BACKYCOMMAND} list lists -h >> _index.md"
|
||||
echo "\`\`\`" >> _index.md
|
||||
echo "## list lists"
|
||||
echo ""
|
||||
echo "\`\`\`"
|
||||
eval "${BACKYCOMMAND} list lists -h"
|
||||
echo "\`\`\`"
|
||||
} >> _index.md
|
||||
|
||||
|
||||
mv _index.md "$CLI_PAGE"
|
@ -68,7 +68,7 @@ func (command *Command) RunCmd(cmdCtxLogger zerolog.Logger, opts *ConfigOpts) ([
|
||||
} else {
|
||||
|
||||
// Handle package operations
|
||||
if command.Type == PackageCT && command.PackageOperation == "checkVersion" {
|
||||
if command.Type == PackageCT && command.PackageOperation == PackOpCheckVersion {
|
||||
cmdCtxLogger.Info().Str("package", command.PackageName).Msg("Checking package versions")
|
||||
|
||||
// Execute the package version command
|
||||
|
@ -585,7 +585,7 @@ func processCmds(opts *ConfigOpts) error {
|
||||
if cmd.PackageManager == "" {
|
||||
return fmt.Errorf("package manager is required for package command %s", cmd.PackageName)
|
||||
}
|
||||
if cmd.PackageOperation == "" {
|
||||
if cmd.PackageOperation.String() == "" {
|
||||
return fmt.Errorf("package operation is required for package command %s", cmd.PackageName)
|
||||
}
|
||||
if cmd.PackageName == "" {
|
||||
@ -594,15 +594,16 @@ func processCmds(opts *ConfigOpts) error {
|
||||
var err error
|
||||
|
||||
// Validate the operation
|
||||
switch cmd.PackageOperation {
|
||||
case "install", "remove", "upgrade", "checkVersion":
|
||||
if cmd.PackageOperation.IsAPackageOperation() {
|
||||
|
||||
cmd.pkgMan, err = pkgman.PackageManagerFactory(cmd.PackageManager, pkgman.WithoutAuth())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
} else {
|
||||
return fmt.Errorf("unsupported package operation %s for command %s", cmd.PackageOperation, cmd.Name)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Parse user commands
|
||||
|
145
pkg/backy/packageoperation_enumer.go
Normal file
145
pkg/backy/packageoperation_enumer.go
Normal file
@ -0,0 +1,145 @@
|
||||
// Code generated by "enumer -linecomment -yaml -text -json -type=PackageOperation"; DO NOT EDIT.
|
||||
|
||||
package backy
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const _PackageOperationName = "installupgradepurgeremovecheckVersionisInstalled"
|
||||
|
||||
var _PackageOperationIndex = [...]uint8{0, 0, 7, 14, 19, 25, 37, 48}
|
||||
|
||||
const _PackageOperationLowerName = "installupgradepurgeremovecheckversionisinstalled"
|
||||
|
||||
func (i PackageOperation) String() string {
|
||||
if i < 0 || i >= PackageOperation(len(_PackageOperationIndex)-1) {
|
||||
return fmt.Sprintf("PackageOperation(%d)", i)
|
||||
}
|
||||
return _PackageOperationName[_PackageOperationIndex[i]:_PackageOperationIndex[i+1]]
|
||||
}
|
||||
|
||||
// An "invalid array index" compiler error signifies that the constant values have changed.
|
||||
// Re-run the stringer command to generate them again.
|
||||
func _PackageOperationNoOp() {
|
||||
var x [1]struct{}
|
||||
_ = x[DefaultPO-(0)]
|
||||
_ = x[PackOpInstall-(1)]
|
||||
_ = x[PackOpUpgrade-(2)]
|
||||
_ = x[PackOpPurge-(3)]
|
||||
_ = x[PackOpRemove-(4)]
|
||||
_ = x[PackOpCheckVersion-(5)]
|
||||
_ = x[PackOpIsInstalled-(6)]
|
||||
}
|
||||
|
||||
var _PackageOperationValues = []PackageOperation{DefaultPO, PackOpInstall, PackOpUpgrade, PackOpPurge, PackOpRemove, PackOpCheckVersion, PackOpIsInstalled}
|
||||
|
||||
var _PackageOperationNameToValueMap = map[string]PackageOperation{
|
||||
_PackageOperationName[0:0]: DefaultPO,
|
||||
_PackageOperationLowerName[0:0]: DefaultPO,
|
||||
_PackageOperationName[0:7]: PackOpInstall,
|
||||
_PackageOperationLowerName[0:7]: PackOpInstall,
|
||||
_PackageOperationName[7:14]: PackOpUpgrade,
|
||||
_PackageOperationLowerName[7:14]: PackOpUpgrade,
|
||||
_PackageOperationName[14:19]: PackOpPurge,
|
||||
_PackageOperationLowerName[14:19]: PackOpPurge,
|
||||
_PackageOperationName[19:25]: PackOpRemove,
|
||||
_PackageOperationLowerName[19:25]: PackOpRemove,
|
||||
_PackageOperationName[25:37]: PackOpCheckVersion,
|
||||
_PackageOperationLowerName[25:37]: PackOpCheckVersion,
|
||||
_PackageOperationName[37:48]: PackOpIsInstalled,
|
||||
_PackageOperationLowerName[37:48]: PackOpIsInstalled,
|
||||
}
|
||||
|
||||
var _PackageOperationNames = []string{
|
||||
_PackageOperationName[0:0],
|
||||
_PackageOperationName[0:7],
|
||||
_PackageOperationName[7:14],
|
||||
_PackageOperationName[14:19],
|
||||
_PackageOperationName[19:25],
|
||||
_PackageOperationName[25:37],
|
||||
_PackageOperationName[37:48],
|
||||
}
|
||||
|
||||
// PackageOperationString retrieves an enum value from the enum constants string name.
|
||||
// Throws an error if the param is not part of the enum.
|
||||
func PackageOperationString(s string) (PackageOperation, error) {
|
||||
if val, ok := _PackageOperationNameToValueMap[s]; ok {
|
||||
return val, nil
|
||||
}
|
||||
|
||||
if val, ok := _PackageOperationNameToValueMap[strings.ToLower(s)]; ok {
|
||||
return val, nil
|
||||
}
|
||||
return 0, fmt.Errorf("%s does not belong to PackageOperation values", s)
|
||||
}
|
||||
|
||||
// PackageOperationValues returns all values of the enum
|
||||
func PackageOperationValues() []PackageOperation {
|
||||
return _PackageOperationValues
|
||||
}
|
||||
|
||||
// PackageOperationStrings returns a slice of all String values of the enum
|
||||
func PackageOperationStrings() []string {
|
||||
strs := make([]string, len(_PackageOperationNames))
|
||||
copy(strs, _PackageOperationNames)
|
||||
return strs
|
||||
}
|
||||
|
||||
// IsAPackageOperation returns "true" if the value is listed in the enum definition. "false" otherwise
|
||||
func (i PackageOperation) IsAPackageOperation() bool {
|
||||
for _, v := range _PackageOperationValues {
|
||||
if i == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// MarshalJSON implements the json.Marshaler interface for PackageOperation
|
||||
func (i PackageOperation) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(i.String())
|
||||
}
|
||||
|
||||
// UnmarshalJSON implements the json.Unmarshaler interface for PackageOperation
|
||||
func (i *PackageOperation) UnmarshalJSON(data []byte) error {
|
||||
var s string
|
||||
if err := json.Unmarshal(data, &s); err != nil {
|
||||
return fmt.Errorf("PackageOperation should be a string, got %s", data)
|
||||
}
|
||||
|
||||
var err error
|
||||
*i, err = PackageOperationString(s)
|
||||
return err
|
||||
}
|
||||
|
||||
// MarshalText implements the encoding.TextMarshaler interface for PackageOperation
|
||||
func (i PackageOperation) MarshalText() ([]byte, error) {
|
||||
return []byte(i.String()), nil
|
||||
}
|
||||
|
||||
// UnmarshalText implements the encoding.TextUnmarshaler interface for PackageOperation
|
||||
func (i *PackageOperation) UnmarshalText(text []byte) error {
|
||||
var err error
|
||||
*i, err = PackageOperationString(string(text))
|
||||
return err
|
||||
}
|
||||
|
||||
// MarshalYAML implements a YAML Marshaler for PackageOperation
|
||||
func (i PackageOperation) MarshalYAML() (interface{}, error) {
|
||||
return i.String(), nil
|
||||
}
|
||||
|
||||
// UnmarshalYAML implements a YAML Unmarshaler for PackageOperation
|
||||
func (i *PackageOperation) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
var s string
|
||||
if err := unmarshal(&s); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
var err error
|
||||
*i, err = PackageOperationString(s)
|
||||
return err
|
||||
}
|
@ -538,7 +538,7 @@ func (command *Command) RunCmdSSH(cmdCtxLogger zerolog.Logger, opts *ConfigOpts)
|
||||
case ScriptFileCT:
|
||||
return command.runScriptFile(commandSession, cmdCtxLogger, &cmdOutBuf)
|
||||
case PackageCT:
|
||||
if command.PackageOperation == "checkVersion" {
|
||||
if command.PackageOperation == PackOpCheckVersion {
|
||||
commandSession.Stderr = nil
|
||||
// Execute the package version command remotely
|
||||
// Parse the output of package version command
|
||||
|
@ -106,7 +106,7 @@ type (
|
||||
PackageVersion string `yaml:"packageVersion,omitempty"`
|
||||
|
||||
// PackageOperation specifies the action for package-related commands (e.g., "install" or "remove")
|
||||
PackageOperation string `yaml:"packageOperation,omitempty"`
|
||||
PackageOperation PackageOperation `yaml:"packageOperation,omitempty"`
|
||||
|
||||
pkgMan pkgman.PackageManager
|
||||
|
||||
@ -293,7 +293,10 @@ type (
|
||||
ListName string // Name of the command list
|
||||
Error error // Error encountered, if any
|
||||
}
|
||||
CommandType int
|
||||
|
||||
// use ints so we can use enums
|
||||
CommandType int
|
||||
PackageOperation int
|
||||
)
|
||||
|
||||
//go:generate go run github.com/dmarkham/enumer -linecomment -yaml -text -json -type=CommandType
|
||||
@ -305,3 +308,14 @@ const (
|
||||
PackageCT // package
|
||||
UserCT // user
|
||||
)
|
||||
|
||||
//go:generate go run github.com/dmarkham/enumer -linecomment -yaml -text -json -type=PackageOperation
|
||||
const (
|
||||
DefaultPO PackageOperation = iota //
|
||||
PackOpInstall // install
|
||||
PackOpUpgrade // upgrade
|
||||
PackOpPurge // purge
|
||||
PackOpRemove // remove
|
||||
PackOpCheckVersion // checkVersion
|
||||
PackOpIsInstalled // isInstalled
|
||||
)
|
||||
|
@ -277,13 +277,13 @@ func getCommandTypeAndSetCommandInfo(command *Command) *Command {
|
||||
if command.Type == PackageCT && !command.packageCmdSet {
|
||||
command.packageCmdSet = true
|
||||
switch command.PackageOperation {
|
||||
case "install":
|
||||
case PackOpInstall:
|
||||
command.Cmd, command.Args = command.pkgMan.Install(command.PackageName, command.PackageVersion, command.Args)
|
||||
case "remove":
|
||||
case PackOpRemove:
|
||||
command.Cmd, command.Args = command.pkgMan.Remove(command.PackageName, command.Args)
|
||||
case "upgrade":
|
||||
case PackOpUpgrade:
|
||||
command.Cmd, command.Args = command.pkgMan.Upgrade(command.PackageName, command.PackageVersion)
|
||||
case "checkVersion":
|
||||
case PackOpCheckVersion:
|
||||
command.Cmd, command.Args = command.pkgMan.CheckVersion(command.PackageName, command.PackageVersion)
|
||||
}
|
||||
}
|
||||
|
@ -44,9 +44,8 @@ func NewS3Fetcher(endpoint string, options ...FetcherOption) (*S3Fetcher, error)
|
||||
*/
|
||||
|
||||
s3Endpoint := os.Getenv("S3_ENDPOINT")
|
||||
creds, err := getS3Credentials("default", s3Endpoint, cfg.HTTPClient)
|
||||
creds, err := getS3Credentials(os.Getenv("AWS_PROFILE"), s3Endpoint, cfg.HTTPClient)
|
||||
if err != nil {
|
||||
println(err.Error())
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@ -133,7 +132,7 @@ func getS3Credentials(profile, host string, httpClient *http.Client) (*credentia
|
||||
if hdirErr != nil {
|
||||
return nil, hdirErr
|
||||
}
|
||||
s3Creds := credentials.NewFileAWSCredentials(path.Join(homeDir, ".aws", "credentials"), "default")
|
||||
s3Creds := credentials.NewFileAWSCredentials(path.Join(homeDir, ".aws", "credentials"), profile)
|
||||
credVals, credErr := s3Creds.GetWithContext(&credentials.CredContext{Endpoint: host, Client: httpClient})
|
||||
if credErr != nil {
|
||||
return nil, credErr
|
||||
|
2
release
2
release
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -eou pipefail
|
||||
go generate ./...
|
||||
export CURRENT_TAG="$(go run backy.go version -V)"
|
||||
CURRENT_TAG="$(go run backy.go version -V)"
|
||||
goreleaser -f .goreleaser/github.yml check
|
||||
goreleaser -f .goreleaser/gitea.yml check
|
||||
changie batch $CURRENT_TAG
|
||||
|
18
tests/backy.yaml
Normal file
18
tests/backy.yaml
Normal file
@ -0,0 +1,18 @@
|
||||
commands:
|
||||
echoTestPass:
|
||||
cmd: echo
|
||||
shell: bash
|
||||
Args: hello world
|
||||
|
||||
runRemoteShellScriptSuccess:
|
||||
cmd:
|
||||
|
||||
|
||||
packageCommandSuccess:
|
||||
packageName: docker-ce
|
||||
Args:
|
||||
- docker-ce-cli
|
||||
packageManager: apt
|
||||
packageOperation: install
|
||||
|
||||
|
Reference in New Issue
Block a user