Skip to content
Permalink
Browse files

Add waiting script for notarization

  • Loading branch information
qvacua committed Dec 22, 2019
1 parent 8b042b5 commit 9b8e9c0dfba9337a51b52c786df9d50663276f92
@@ -0,0 +1,2 @@
*.dylib filter=lfs diff=lfs merge=lfs -text
*.a filter=lfs diff=lfs merge=lfs -text
@@ -1,7 +1,8 @@
// Auto generated for nvim v0.4.3.
// See bin/generate_autocmds.py
// Auto generated for nvim v0.4.3
// See bin/generate_autocmds.sh
enum NvimAutoCommandEvent: Int {

case bufadd = 0
case bufdelete = 1
case bufenter = 2
@@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
Copyright (C) 1995-1997, 2000-2016 Free Software Foundation, Inc.
Copyright (C) 1995-1997, 2000-2016, 2018-2019 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -12,7 +12,7 @@
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
along with this program. If not, see <https://www.gnu.org/licenses/>. */

#ifndef _LIBINTL_H
#define _LIBINTL_H 1
@@ -54,7 +54,7 @@ extern "C" {


/* Version number: (major<<16) + (minor<<8) + subminor */
#define LIBINTL_VERSION 0x001308
#define LIBINTL_VERSION 0x001400
extern int libintl_version;


@@ -111,7 +111,7 @@ extern int libintl_version;
/* _INTL_MAY_RETURN_STRING_ARG(n) declares that the given function may return
its n-th argument literally. This enables GCC to warn for example about
printf (gettext ("foo %y")). */
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && defined __cplusplus)
#if defined __GNUC__ && __GNUC__ >= 3 && !(defined __APPLE_CC__ && __APPLE_CC__ > 1 && !(defined __clang__ && __clang__ && __clang_major__ >= 3) && defined __cplusplus)
# define _INTL_MAY_RETURN_STRING_ARG(n) __attribute__ ((__format_arg__ (n)))
#else
# define _INTL_MAY_RETURN_STRING_ARG(n)
@@ -123,7 +123,9 @@ extern int libintl_version;
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_gettext (const char *__msgid)
_INTL_MAY_RETURN_STRING_ARG (1);
static inline char *gettext (const char *__msgid)
static inline
_INTL_MAY_RETURN_STRING_ARG (1)
char *gettext (const char *__msgid)
{
return libintl_gettext (__msgid);
}
@@ -141,7 +143,9 @@ extern char *gettext (const char *__msgid)
#ifdef _INTL_REDIRECT_INLINE
extern char *libintl_dgettext (const char *__domainname, const char *__msgid)
_INTL_MAY_RETURN_STRING_ARG (2);
static inline char *dgettext (const char *__domainname, const char *__msgid)
static inline
_INTL_MAY_RETURN_STRING_ARG (2)
char *dgettext (const char *__domainname, const char *__msgid)
{
return libintl_dgettext (__domainname, __msgid);
}
@@ -160,8 +164,9 @@ extern char *dgettext (const char *__domainname, const char *__msgid)
extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
int __category)
_INTL_MAY_RETURN_STRING_ARG (2);
static inline char *dcgettext (const char *__domainname, const char *__msgid,
int __category)
static inline
_INTL_MAY_RETURN_STRING_ARG (2)
char *dcgettext (const char *__domainname, const char *__msgid, int __category)
{
return libintl_dcgettext (__domainname, __msgid, __category);
}
@@ -182,8 +187,10 @@ extern char *dcgettext (const char *__domainname, const char *__msgid,
extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2);
static inline char *ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
static inline
_INTL_MAY_RETURN_STRING_ARG (1) _INTL_MAY_RETURN_STRING_ARG (2)
char *ngettext (const char *__msgid1, const char *__msgid2,
unsigned long int __n)
{
return libintl_ngettext (__msgid1, __msgid2, __n);
}
@@ -203,8 +210,10 @@ extern char *ngettext (const char *__msgid1, const char *__msgid2,
extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
static inline char *dngettext (const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n)
static inline
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
char *dngettext (const char *__domainname, const char *__msgid1,
const char *__msgid2, unsigned long int __n)
{
return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
}
@@ -226,9 +235,11 @@ extern char *libintl_dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3);
static inline char *dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
static inline
_INTL_MAY_RETURN_STRING_ARG (2) _INTL_MAY_RETURN_STRING_ARG (3)
char *dcngettext (const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category)
{
return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
}
@@ -396,7 +407,7 @@ extern int vasprintf (char **, const char *, va_list);

#endif

#if 0
#if 1

#undef fwprintf
#define fwprintf libintl_fwprintf
@@ -424,8 +435,32 @@ extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
#endif


/* Support for retrieving the name of a locale_t object. */
#if 0

#ifndef GNULIB_defined_newlocale /* don't override gnulib */
#undef newlocale
#define newlocale libintl_newlocale
extern locale_t newlocale (int, const char *, locale_t);
#endif

#ifndef GNULIB_defined_duplocale /* don't override gnulib */
#undef duplocale
#define duplocale libintl_duplocale
extern locale_t duplocale (locale_t);
#endif

#ifndef GNULIB_defined_freelocale /* don't override gnulib */
#undef freelocale
#define freelocale libintl_freelocale
extern void freelocale (locale_t);
#endif

#endif


/* Support for the locale chosen by the user. */
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __WIN32__ || defined __CYGWIN__
#if (defined __APPLE__ && defined __MACH__) || defined _WIN32 || defined __CYGWIN__

#ifndef GNULIB_defined_setlocale /* don't override gnulib */
#undef setlocale
@@ -437,7 +472,10 @@ extern char *setlocale (int, const char *);

#undef newlocale
#define newlocale libintl_newlocale
/* Declare newlocale() only if the system headers define the 'locale_t' type. */
#if !(defined __CYGWIN__ && !defined LC_ALL_MASK)
extern locale_t newlocale (int, const char *, locale_t);
#endif

#endif

Binary file not shown.
Binary file not shown.
@@ -1455,7 +1455,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cp ${SRCROOT}/../Carthage/Checkouts/github-markdown-css/github-markdown.css ${SRCROOT}/VimR/markdown/";
shellScript = "cp ${SRCROOT}/../Carthage/Checkouts/github-markdown-css/github-markdown.css ${SRCROOT}/VimR/markdown/\n";
};
4B2636A8223A487B00021586 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
@@ -1,42 +1,44 @@
#!/bin/bash
set -Eeuo pipefail

# For jenkins

set -e
echo "### Building in Jenkins"
pushd "$( dirname "${BASH_SOURCE[0]}" )/.." > /dev/null

# for utf-8 for python script
export LC_CTYPE=en_US.UTF-8
export PATH=/usr/local/bin:$PATH

# # parameters
# - BRANCH
# - IS_SNAPSHOT
# - MARKETING_VERSION
# - RELEASE_NOTES
# - UPDATE_APPCAST
readonly publish=${publish:?"true or false"}
readonly branch=${branch:?"Eg develop"}
readonly release_notes=${release_notes:?"Some (multiline) markdown text"}
readonly is_snapshot=${is_snapshot:?"true or false"}
readonly update_appcast=${update_appcast:?"true or false"}
readonly update_snapshot_appcast_for_release=${update_snapshot_appcast_for_release:?"true or false"}

export marketing_version=${marketing_version:?"0.29.0"}


if [[ "${IS_SNAPSHOT}" = false ]] && [[ "${MARKETING_VERSION}" == "" ]] ; then
if [[ "${is_snapshot}" = false ]] && [[ "${marketing_version}" == "" ]] ; then
echo "### ERROR If not snapshot, then the marketing version must be set!"
exit 1
fi

if [[ "${PUBLISH}" = true ]] && [[ "${RELEASE_NOTES}" == "" ]] ; then
if [[ "${publish}" == true ]] && [[ "${release_notes}" == "" ]] ; then
echo "### ERROR No release notes, but publishing to Github!"
exit 1
fi

# We have to manually notarize the app for now.
#if [[ "${IS_SNAPSHOT}" = false ]] && [[ "${UPDATE_APPCAST}" = false ]] ; then
# echo "### ERROR Not updating appcast for release!"
# exit 1
#fi
if [[ "${is_snapshot}" == false ]] && [[ "${update_appcast}" == false ]] ; then
echo "### ERROR Not updating appcast for release!"
exit 1
fi

if [[ "${IS_SNAPSHOT}" = false ]] && [[ "${BRANCH}" != "master" ]] ; then
if [[ "${is_snapshot}" == false ]] && [[ "${branch}" != "master" ]] ; then
echo "### ERROR Not building master for release!"
exit 1
fi

if [[ "${IS_SNAPSHOT}" = true ]] && [[ "${BRANCH}" == "master" ]] ; then
if [[ "${is_snapshot}" == true ]] && [[ "${branch}" == "master" ]] ; then
echo "### ERROR Building master for snapshot!"
exit 1
fi
@@ -45,65 +47,92 @@ echo "### Installing some python packages"

pip3 install requests
pip3 install Markdown
pip3 install waiting

echo "### Building VimR"

./bin/prepare_repositories.sh
./bin/clean_old_builds.sh

if [[ "${IS_SNAPSHOT}" = false ]] || [[ "${PUBLISH}" = true ]] ; then
./bin/set_new_versions.sh ${IS_SNAPSHOT} "${MARKETING_VERSION}"
if [[ "${is_snapshot}" == false ]] || [[ "${publish}" == true ]] ; then
./bin/set_new_versions.sh
else
echo "Not publishing and no release => not incrementing the version..."
fi

./bin/build_vimr.sh true
code_sign=true use_carthage_cache=false ./bin/build_vimr.sh

pushd VimR
BUNDLE_VERSION=$(agvtool what-version | sed '2q;d' | sed -E 's/ +(.+)/\1/')
MARKETING_VERSION=$(agvtool what-marketing-version | tail -n 1 | sed -E 's/.*of "(.*)" in.*/\1/')
popd
pushd VimR > /dev/null
export readonly bundle_version=$(agvtool what-version | sed '2q;d' | sed -E 's/ +(.+)/\1/')
export marketing_version=$(agvtool what-marketing-version | tail -n 1 | sed -E 's/.*of "(.*)" in.*/\1/')
popd > /dev/null

COMPOUND_VERSION="v${MARKETING_VERSION}-${BUNDLE_VERSION}"
TAG=${COMPOUND_VERSION}

if [[ "${IS_SNAPSHOT}" = true ]] ; then
COMPOUND_VERSION="SNAPSHOT-${BUNDLE_VERSION}"
TAG="snapshot/${BUNDLE_VERSION}"
if [[ "${is_snapshot}" == true ]]; then
export readonly compound_version="SNAPSHOT-${bundle_version}"
export readonly tag="snapshot/${bundle_version}"
else
export readonly compound_version="v${marketing_version}-${bundle_version}"
export readonly tag=${compound_version}
fi

echo "### Compressing the app"
VIMR_FILE_NAME="VimR-${COMPOUND_VERSION}.tar.bz2"
pushd build/Build/Products/Release
tar cjf ${VIMR_FILE_NAME} VimR.app
popd

echo "### Bundle version: ${BUNDLE_VERSION}"
echo "### Marketing version: ${MARKETING_VERSION}"
echo "### Compund version: ${COMPOUND_VERSION}"
echo "### Tag: ${TAG}"
echo "### VimR archive file name: ${VIMR_FILE_NAME}"

if [[ "${PUBLISH}" = false ]] ; then
export readonly vimr_file_name="VimR-${compound_version}.tar.bz2"

pushd build/Build/Products/Release > /dev/null
tar cjf ${vimr_file_name} VimR.app
popd > /dev/null

echo "### Bundle version: ${bundle_version}"
echo "### Marketing version: ${marketing_version}"
echo "### Compund version: ${compound_version}"
echo "### Tag: ${tag}"
echo "### VimR archive file name: ${vimr_file_name}"

if [[ "${publish}" == false ]] ; then
echo "Do not publish => exiting now..."
exit 0
fi

./bin/commit_and_push_tags.sh "${BRANCH}" "${TAG}"
./bin/create_github_release.sh "${COMPOUND_VERSION}" "${TAG}" "${VIMR_FILE_NAME}" "${RELEASE_NOTES}" ${IS_SNAPSHOT}

if [[ "${UPDATE_APPCAST}" = true ]] ; then
./bin/set_appcast.py "build/Build/Products/Release/${VIMR_FILE_NAME}" "${BUNDLE_VERSION}" "${MARKETING_VERSION}" "${TAG}" ${IS_SNAPSHOT}
./bin/commit_and_push_appcast.sh "${BRANCH}" "${COMPOUND_VERSION}" ${IS_SNAPSHOT} ${UPDATE_SNAPSHOT_APPCAST_FOR_RELEASE}
echo "### Notarizing"
pushd ./build/Build/Products/Release > /dev/null
codesign \
--force -s "Developer ID Application: Tae Won Ha (H96Q2NKTQH)" --timestamp --options=runtime \
VimR.app/Contents/Frameworks/NvimView.framework/Versions/A/PlugIns/NvimServer
ditto -c -k --keepParent VimR.app VimR.app.zip
echo "### Uploading"
export readonly request_uuid=$(xcrun \
altool --notarize-app --primary-bundle-id "com.qvacua.VimR" \
--username "hataewon@gmail.com" --password "@keychain:dev-notar" \
--file VimR.app.zip | grep RequestUUID | sed -E 's/.* = (.*)/\1/')
popd > /dev/null

echo "### Waiting for notarization ${request_uuid} to finish"
./bin/wait_for_notarization.py
echo "### Notarization finished"

pushd ./build/Build/Products/Release > /dev/null
rm -rf ${vimr_file_name}
xcrun stapler staple VimR.app
tar cjf ${vimr_file_name} VimR.app
popd > /dev/null

./bin/commit_and_push_tags.sh
./bin/create_github_release.sh

if [[ "${update_appcast}" == true ]]; then
./bin/set_appcast.py "build/Build/Products/Release/${vimr_file_name}" "${bundle_version}" "${marketing_version}" "${tag}" ${is_snapshot}
./bin/commit_and_push_appcast.sh "${branch}" "${compound_version}" ${is_snapshot} ${update_snapshot_appcast_for_release}
fi

if [[ "${IS_SNAPSHOT}" = false ]] ; then
echo "### Merging ${BRANCH} back to develop"
if [[ "${is_snapshot}" == false ]] ; then
echo "### Merging ${branch} back to develop"
git reset --hard @
git fetch origin
git checkout -b for_master_to_develop origin/develop
git merge --ff-only for_build
git push origin HEAD:develop
fi

popd > /dev/null
echo "### Built VimR"

0 comments on commit 9b8e9c0

Please sign in to comment.
You can’t perform that action at this time.