diff --git a/package/BuildAndPackage.command b/package/BuildAndPackage.command index 2b9e9f8..40c827b 100755 --- a/package/BuildAndPackage.command +++ b/package/BuildAndPackage.command @@ -27,25 +27,28 @@ fi UNCOMMITED_CHANGE=$(git status -s | wc -l | bc) -if [ $UNCOMMITED_CHANGE -ne 0 ] && [ "$CONFIGURATION" == "Release" ] +if [ -z $FORCE_SKIP_REPO_STATE ] then - echo "Your are on ${CURRENT_BRANCH} and there" - echo "is some uncommited change to the repo." - echo "Please, commit and try again or use" - echo "a development branch." - exit 1 + if [ $UNCOMMITED_CHANGE -ne 0 ] && [ "$CONFIGURATION" == "Release" ] + then + echo "Your are on ${CURRENT_BRANCH} and there" + echo "is some uncommited change to the repo." + echo "Please, commit and try again or use" + echo "a development branch." + exit 1 + fi fi PKG_VERSION=$(/usr/libexec/PlistBuddy -c "print CFBundleShortVersionString" "${PROJECT_DIR}/Hello IT/Info.plist") if [[ "$CURRENT_BRANCH" == release* ]] then - CONFIGURATION="Release" + CONFIGURATION="Release" VERSION_FROM_BRANCH=$(echo "${CURRENT_BRANCH}" | awk -F'/' '{print $2}') - if [[ "$VERSION_FROM_BRANCH" =~ ^[0-9]+\.[0-9]+ ]] + if [[ "$VERSION_FROM_BRANCH" =~ ^[0-9]+\.[0-9]+ ]] then - PKG_VERSION=$VERSION_FROM_BRANCH - /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $PKG_VERSION" "${PROJECT_DIR}/Hello IT/Info.plist" + PKG_VERSION=$VERSION_FROM_BRANCH + /usr/libexec/PlistBuddy -c "Set CFBundleShortVersionString $PKG_VERSION" "${PROJECT_DIR}/Hello IT/Info.plist" git add "${PROJECT_DIR}/Hello IT/Info.plist" git commit -m "Update app version number according to release branch" fi @@ -95,7 +98,12 @@ cp -r "${GIT_ROOT_DIR}/package/LaunchAgents/com.github.ygini.hello-it.plist" "${ #sudo chown -R root:wheel "${PKG_ROOT}" -pkgbuild --component-plist "${GIT_ROOT_DIR}/package/pkgbuild_options.plist" --sign "${DEVELOPER_ID_INSTALLER}" --root "${PKG_ROOT}" --scripts "${GIT_ROOT_DIR}/package/pkg_scripts" --identifier "com.github.ygini.hello-it" --version "${PKG_VERSION}" "${RELEASE_LOCATION}/Hello-IT-${PKG_VERSION}-${CONFIGURATION}.pkg" +PBK_BUILD_COMPONENT="${BUILT_PRODUCTS_DIR}/components.plist" +pkgbuild --analyze --root "${PKG_ROOT}" "${PBK_BUILD_COMPONENT}" + +/usr/libexec/PlistBuddy -c "Set 0:BundleIsRelocatable bool false" "${PBK_BUILD_COMPONENT}" +/usr/libexec/PlistBuddy -c "Print" "${PBK_BUILD_COMPONENT}" +pkgbuild --component-plist "${PBK_BUILD_COMPONENT}" --sign "${DEVELOPER_ID_INSTALLER}" --root "${PKG_ROOT}" --scripts "${GIT_ROOT_DIR}/package/pkg_scripts" --identifier "com.github.ygini.hello-it" --version "${PKG_VERSION}" "${RELEASE_LOCATION}/Hello-IT-${PKG_VERSION}-${CONFIGURATION}.pkg" rm -rf "${PKG_ROOT}" diff --git a/package/pkgbuild_options.plist b/package/pkgbuild_options.plist deleted file mode 100644 index 3d8b0cc..0000000 --- a/package/pkgbuild_options.plist +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - BundleIsRelocatable - - - - - diff --git a/src/HITDevKit/HITDevKit/Info.plist b/src/HITDevKit/HITDevKit/Info.plist index 1ad6ce0..78963ca 100644 --- a/src/HITDevKit/HITDevKit/Info.plist +++ b/src/HITDevKit/HITDevKit/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 NSHumanReadableCopyright Copyright © 2015 Yoann Gini (Open Source Project). All rights reserved. NSPrincipalClass diff --git a/src/Hello IT/Info.plist b/src/Hello IT/Info.plist index ff04528..bad3981 100644 --- a/src/Hello IT/Info.plist +++ b/src/Hello IT/Info.plist @@ -21,7 +21,7 @@ CFBundleSignature ???? CFBundleVersion - 198 + 199 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/src/Plugins/OpenApplication/OpenApplication/Info.plist b/src/Plugins/OpenApplication/OpenApplication/Info.plist index b02c3da..d05f4fe 100644 --- a/src/Plugins/OpenApplication/OpenApplication/Info.plist +++ b/src/Plugins/OpenApplication/OpenApplication/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 HITPFunctionIdentifier public.open.application NSHumanReadableCopyright diff --git a/src/Plugins/OpenResource/OpenResource/Info.plist b/src/Plugins/OpenResource/OpenResource/Info.plist index 677b56a..acff105 100644 --- a/src/Plugins/OpenResource/OpenResource/Info.plist +++ b/src/Plugins/OpenResource/OpenResource/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 HITPFunctionIdentifier public.open.resource NSHumanReadableCopyright diff --git a/src/Plugins/Quit/Quit/Info.plist b/src/Plugins/Quit/Quit/Info.plist index b0abbcd..2fa4c04 100644 --- a/src/Plugins/Quit/Quit/Info.plist +++ b/src/Plugins/Quit/Quit/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 HITPFunctionIdentifier public.quit NSHumanReadableCopyright diff --git a/src/Plugins/ScriptedItem/ScriptedItem/Info.plist b/src/Plugins/ScriptedItem/ScriptedItem/Info.plist index 1517372..7bd501a 100644 --- a/src/Plugins/ScriptedItem/ScriptedItem/Info.plist +++ b/src/Plugins/ScriptedItem/ScriptedItem/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 HITPFunctionIdentifier public.script.item NSHumanReadableCopyright diff --git a/src/Plugins/Separator/Separator/Info.plist b/src/Plugins/Separator/Separator/Info.plist index 1891f94..28d1d97 100644 --- a/src/Plugins/Separator/Separator/Info.plist +++ b/src/Plugins/Separator/Separator/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 HITPFunctionIdentifier public.separator NSHumanReadableCopyright diff --git a/src/Plugins/SubMenu/SubMenu/Info.plist b/src/Plugins/SubMenu/SubMenu/Info.plist index 9756999..0a5a3bc 100644 --- a/src/Plugins/SubMenu/SubMenu/Info.plist +++ b/src/Plugins/SubMenu/SubMenu/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 HITPFunctionIdentifier public.submenu NSHumanReadableCopyright diff --git a/src/Plugins/TestHTTP/TestHTTP/Info.plist b/src/Plugins/TestHTTP/TestHTTP/Info.plist index 9da8421..0f2db5d 100644 --- a/src/Plugins/TestHTTP/TestHTTP/Info.plist +++ b/src/Plugins/TestHTTP/TestHTTP/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 HITPFunctionIdentifier public.test.http NSHumanReadableCopyright diff --git a/src/Plugins/Title/Title/Info.plist b/src/Plugins/Title/Title/Info.plist index 70d3ace..4639402 100644 --- a/src/Plugins/Title/Title/Info.plist +++ b/src/Plugins/Title/Title/Info.plist @@ -19,7 +19,7 @@ CFBundleSignature ???? CFBundleVersion - 178 + 199 HITPFunctionIdentifier public.title NSHumanReadableCopyright