You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/01/17 20:08:52 UTC

[GitHub] [couchdb] wohali commented on a change in pull request #1927: build: stop propagating RC tags into erlang apps

wohali commented on a change in pull request #1927: build: stop propagating RC tags into erlang apps
URL: https://github.com/apache/couchdb/pull/1927#discussion_r368115127
 
 

 ##########
 File path: Makefile
 ##########
 @@ -121,10 +134,13 @@ help:
 
 .PHONY: couch
 # target: couch - Build CouchDB core, use ERL_OPTS to provide custom compiler's options
-couch: config.erl
+couch: config.erl derived set_otp_vsn
 	@COUCHDB_VERSION=$(COUCHDB_VERSION) COUCHDB_GIT_SHA=$(COUCHDB_GIT_SHA) $(REBAR) compile $(COMPILE_OPTS)
 	@cp src/couch/priv/couchjs bin/
 
+# target: set_otp_vsn - ensure that vsn field in OTP app is set appropriately
+set_otp_vsn:
+	@sed -i$(sed v < /dev/null 2> /dev/null || echo -n " ''")  -e "s/{vsn, git}/${SUB_VSN}/" $(shell find ./src -type f -name \*.app.src)
 
 Review comment:
   The crazy subshell here is to detect if we are using GNU sed (which does not require a file extension to be specified for `-i`, or BSD sed, which _does_ require a file extension (which we then set to null).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services