Skip to content

Commit

Permalink
Cleanup command on folder
Browse files Browse the repository at this point in the history
  • Loading branch information
asteel-gsa committed May 24, 2024
1 parent 24919e6 commit c514253
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/s3_to_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os"
"strings"

"github.com/bitfield/script"
"github.com/spf13/cobra"
"gov.gsa.fac.cgov-util/internal/logging"
"gov.gsa.fac.cgov-util/internal/pipes"
Expand Down Expand Up @@ -177,6 +178,8 @@ var S3toDBCmd = &cobra.Command{
os.Exit(logging.COULD_NOT_FIND_CREDENTIALS)
}
bucket_to_local_tables(db_creds, bucket_creds, path_struct)
os.Remove("pg_dump_tables")
logging.Logger.Println("Finished Restore and cleaning residual files/folders.")
case "DEV":
fallthrough
case "STAGING":
Expand All @@ -188,6 +191,8 @@ var S3toDBCmd = &cobra.Command{
os.Exit(logging.COULD_NOT_FIND_CREDENTIALS)
}
bucket_to_cgov_tables(bucket_creds, db_creds, path_struct)
os.Remove("pg_dump_tables")
logging.Logger.Println("Finished Restore and cleaning residual files/folders.")
}
},
}
Expand Down

0 comments on commit c514253

Please sign in to comment.