Skip to content

Commit

Permalink
Merge pull request #21 from safesoftware/fix-project-download-examples
Browse files Browse the repository at this point in the history
Fix project download and workspace examples
  • Loading branch information
garnold54 authored Jan 30, 2023
2 parents ac29bf0 + 9667f29 commit 2106a69
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cmd/cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func runCancel(f *cancelFlags) func(cmd *cobra.Command, args []string) error {
// FME Server 2022.0 and later can use v4. Otherwise fall back to v3
if f.apiVersion == "" {
fmeserverBuild := viper.GetInt("build")
if fmeserverBuild < healthcheckV4BuildThreshold {
if fmeserverBuild < cancelV4BuildThreshold {
f.apiVersion = apiVersionFlagV3
} else {
f.apiVersion = apiVersionFlagV4
Expand Down
8 changes: 4 additions & 4 deletions cmd/projects_download.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ func newProjectDownloadCmd() *cobra.Command {
return nil
},
Example: `
# back up to a local file
fmeserver backup -f my_local_backup.fsconfig
# download a project named "Test Project" to a local file with default name
fmeserver projects download --name "Test Project"
# back up to the "Backup" folder in the FME Server Shared Resources with the file name my_fme_backup.fsconfig
fmeserver backup --resource --export-package my_fme_backup.fsconfig`,
# download a project named "Test Project" to a local file named MyProject.fsproject
fmeserver projects download --name "Test Project" -f MyProject.fsproject`,
Args: NoArgs,
RunE: projectDownloadRun(&f),
}
Expand Down
4 changes: 2 additions & 2 deletions cmd/workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,8 @@ func newWorkspaceCmd() *cobra.Command {
# Get information on a single workspace
fmeserver workspaces --repository Samples --name austinApartments.fmw
# Get the name, source format, destination format, and the services this workspace is assigned to
fmeserver workspaces --repository Samples --name austinApartments.fmw --output=custom-columns=NAME:.name,SOURCE:.datasets.source[*].format,DEST:.datasets.destination[*].format,SERVICES:.services[*].name`,
# Get the name, source format, and destination format for this workspace
fmeserver workspaces --repository Samples --name austinApartments.fmw --output=custom-columns=NAME:.name,SOURCE:.datasets.source[*].format,DEST:.datasets.destination[*].format`,
Args: NoArgs,
PreRunE: func(cmd *cobra.Command, args []string) error {
// get build to decide if we should use v3 or v4
Expand Down

0 comments on commit 2106a69

Please sign in to comment.