File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 77 "fmt"
88 "github.com/semantic-release/go-semantic-release"
99 "github.com/semantic-release/go-semantic-release/condition"
10+ "github.com/semantic-release/go-semantic-release/update"
1011 "io/ioutil"
1112 "log"
1213 "os"
@@ -31,6 +32,7 @@ func main() {
3132 dry := flag .Bool ("dry" , false , "do not create release" )
3233 vFile := flag .Bool ("vf" , false , "create a .version file" )
3334 showVersion := flag .Bool ("version" , false , "outputs the semantic-release version" )
35+ updateFile := flag .String ("update" , "" , "updates the version of a certain file" )
3436 flag .Parse ()
3537
3638 if * showVersion {
@@ -92,5 +94,9 @@ func main() {
9294 exitIfError (ioutil .WriteFile (".version" , []byte (newVer .String ()), 0644 ))
9395 }
9496
97+ if * updateFile != "" {
98+ exitIfError (update .Apply (* updateFile , newVer .String ()))
99+ }
100+
95101 logger .Println ("done." )
96102}
You can’t perform that action at this time.
0 commit comments