Xamarin-macios: [Makefile] Incorrect 'HEAD' word used as branch for xcode10 pkg

Created on 21 Aug 2018  路  5Comments  路  Source: xamarin/xamarin-macios

Our packages from the xcode10 branch have an incorrect "branch" when looking at the version information from VSMac.

See:

Xamarin.iOS
Version: 11.99.3.243 (Visual Studio Enterprise)
Hash: 347f472b0
Branch: HEAD
Build date: 2018-08-21 04:53:44-0400

This comes from that code: https://github.com/xamarin/xamarin-macios/blob/5995833903a99a310803cd64a505c5464e42c09e/Makefile#L54-L58

bug iOS

Most helpful comment

@spouliot we can do better: Jenkins knows the branch name (which Wrench didn't), which means we can make this completely automatic.

ifeq ($(BRANCH_NAME),) 
# BRANCH_NAME is set in Jenkins, so this is for local builds.
CURRENT_BRANCH:=$(shell git rev-parse --abbrev-ref HEAD) 
else
CURRENT_BRANCH:=$(BRANCH_NAME) 
endif 

and then the PACKAGE_HEAD_BRANCH code can be removed.

All 5 comments

$ cat ./_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/buildinfo
Version: 11.99.3.541
Hash: c60397c9
Branch: xcode10
Build date: 2018-08-23 16:40:22-0400

@rolfbjarne is it possible the bots don't know the branch name and default to HEAD ?

@rolfbjarne any reason for not always using PACKAGE_HEAD_BRANCH ?
if we can't avoid the variable then I'd rather use it everywhere - makes it more likely we'll spot it being incorrect :)

@spouliot we can do better: Jenkins knows the branch name (which Wrench didn't), which means we can make this completely automatic.

ifeq ($(BRANCH_NAME),) 
# BRANCH_NAME is set in Jenkins, so this is for local builds.
CURRENT_BRANCH:=$(shell git rev-parse --abbrev-ref HEAD) 
else
CURRENT_BRANCH:=$(BRANCH_NAME) 
endif 

and then the PACKAGE_HEAD_BRANCH code can be removed.

Was this page helpful?
0 / 5 - 0 ratings