@@ -92,10 +92,9 @@ func (h *Hashrelease) URL() string {
92
92
//
93
93
// 3. It sets it as the latest for its product stream if specified.
94
94
func Publish (productCode string , h * Hashrelease , cfg * Config ) error {
95
- srcDir := strings .TrimSuffix (h .Source , "/" ) + "/"
96
95
logrus .WithFields (logrus.Fields {
97
96
"hashrelease" : h .Name ,
98
- "srcDir" : srcDir ,
97
+ "srcDir" : h . Source ,
99
98
"latest" : h .Latest ,
100
99
}).Info ("Publishing hashrelease" )
101
100
@@ -124,14 +123,18 @@ func publishFiles(h *Hashrelease, cfg *Config) error {
124
123
logrus .WithFields (logrus.Fields {
125
124
"hashrelease" : h .Name ,
126
125
"srcDir" : h .Source ,
127
- }).Info ("Publishing hashrelease" )
126
+ }).Info ("Publishing hashrelease files " )
128
127
var allErr error
129
128
// publish to the server via SSH
130
- logrus .WithField ("hashrelease" , h .Name ).Debug ("Publishing hashrelease via SSH" )
129
+ srcDir := h .Source + "/"
130
+ logrus .WithFields (logrus.Fields {
131
+ "hashrelease" : h .Name ,
132
+ "srcDir" : srcDir ,
133
+ }).Debug ("Publishing hashrelease via SSH" )
131
134
if _ , err := command .Run ("rsync" ,
132
135
[]string {
133
136
"--stats" , "-az" , "--delete" ,
134
- fmt .Sprintf ("--rsh=%s" , cfg .RSHCommand ()), h . Source ,
137
+ fmt .Sprintf ("--rsh=%s" , cfg .RSHCommand ()), srcDir ,
135
138
fmt .Sprintf ("%s:%s/%s" , cfg .HostString (), RemoteDocsPath (cfg .User ), h .Name ),
136
139
}); err != nil {
137
140
logrus .WithError (err ).Error ("Failed to publish hashrelease via SSH" )
0 commit comments