mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 00:02:28 +00:00
added nosparkle define to explicitly disable sparkle updates
This commit is contained in:
@@ -18,7 +18,9 @@ script: xcodebuild clean && xcodebuild build -configuration release -project Mac
|
|||||||
# - zip -9r ./build/Build/Products/Release/MacPass.app MacPass-continuous.zip
|
# - zip -9r ./build/Build/Products/Release/MacPass.app MacPass-continuous.zip
|
||||||
# - wget -c https://github.com/MacPass/uploadtool/raw/master/upload.sh
|
# - wget -c https://github.com/MacPass/uploadtool/raw/master/upload.sh
|
||||||
# - bash ./upload.sh build/*
|
# - bash ./upload.sh build/*
|
||||||
|
|
||||||
|
# TODO: fix versioning since it yield a 00 release number
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- /^(?i:continuous)$/
|
- /^(?i:continuous)$/
|
||||||
|
|||||||
@@ -1682,8 +1682,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "git=`sh /etc/profile; which git`\nbranch_name=`$git symbolic-ref HEAD | sed -e 's,.*/\\\\(.*\\\\),\\\\1,'`\ngit_count=`$git rev-list $branch_name |wc -l | sed 's/^ *//;s/ *$//'`\nsimple_branch_name=`$git rev-parse --abbrev-ref HEAD`\n\nbuild_number=\"${git_count}0\"\nif [ $CONFIGURATION != \"Release\" ]; then\nbuild_number+=\"-$simple_branch_name\"\nfi\n\nplist=\"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\ndsym_plist=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$plist\"\nif [ -f \"$DSYM_INFO_PLIST\" ] ; then\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$dsym_plist\"\nfi";
|
shellScript = "git=`sh /etc/profile; which git`\nbranch_name=`$git symbolic-ref HEAD | sed -e 's,.*/\\\\(.*\\\\),\\\\1,'`\ngit_count=`$git rev-list $branch_name |wc -l | sed 's/^ *//;s/ *$//'`\nsimple_branch_name=`$git rev-parse --abbrev-ref HEAD`\n\nbuild_number=\"${git_count}0\"\nif [ $CONFIGURATION != \"Release\" ]; then\nbuild_number+=\"-$simple_branch_name\"\nfi\nif [ $simple_branch_name = \"travis_continuous\" ]; then\nbuild_date=`date +\"%Y%m%d%H%m%S\"`\nbuild_number=\"$build_date-continuous\"\nfi\n\n\nplist=\"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\ndsym_plist=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$plist\"\nif [ -f \"$DSYM_INFO_PLIST\" ] ; then\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$dsym_plist\"\nfi";
|
||||||
showEnvVarsInLog = 0;
|
|
||||||
};
|
};
|
||||||
/* End PBXShellScriptBuildPhase section */
|
/* End PBXShellScriptBuildPhase section */
|
||||||
|
|
||||||
|
|||||||
@@ -157,13 +157,16 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
|
- (void)applicationDidFinishLaunching:(NSNotification *)notification {
|
||||||
|
#if defined(NOSPARKLE)
|
||||||
|
NSLog(@"Sparkle explicitly disabled!!!");
|
||||||
|
#endif
|
||||||
/* Daemon instanziieren */
|
/* Daemon instanziieren */
|
||||||
[MPLockDaemon defaultDaemon];
|
[MPLockDaemon defaultDaemon];
|
||||||
[MPAutotypeDaemon defaultDaemon];
|
[MPAutotypeDaemon defaultDaemon];
|
||||||
/* Create Plugin Manager */
|
/* Create Plugin Manager */
|
||||||
[MPPluginHost sharedHost];
|
[MPPluginHost sharedHost];
|
||||||
#ifndef DEBUG
|
#if !defined(DEBUG) && !defined(NOSPARKLE)
|
||||||
/* Only enable updater in Release */
|
/* Disable updates if in debug or nosparkle */
|
||||||
[SUUpdater sharedUpdater];
|
[SUUpdater sharedUpdater];
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -231,10 +234,10 @@ NSString *const MPDidChangeStoredKeyFilesSettings = @"com.hicknhack.macpass.MPDi
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)checkForUpdates:(id)sender {
|
- (void)checkForUpdates:(id)sender {
|
||||||
#ifdef DEBUG
|
#if defined(DEBUG) || defined(NOSPARKLE)
|
||||||
NSAlert *alert = [[NSAlert alloc] init];
|
NSAlert *alert = [[NSAlert alloc] init];
|
||||||
alert.messageText = @"Updates are disabled!";
|
alert.messageText = @"Updates are disabled!";
|
||||||
alert.informativeText = [NSString stringWithFormat:@"Sparkle updates are only available in offical releases of %@!", NSApp.applicationName];
|
alert.informativeText = [NSString stringWithFormat:@"Sparkle updates are disabled for this build of %@!", NSApp.applicationName];
|
||||||
[alert addButtonWithTitle:@"Ok"];
|
[alert addButtonWithTitle:@"Ok"];
|
||||||
[alert runModal];
|
[alert runModal];
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
- (void)awakeFromNib {
|
- (void)awakeFromNib {
|
||||||
/* only enable bindings to settings in release mode */
|
/* only enable bindings to settings in release mode */
|
||||||
#ifdef DEBUG
|
#if defined(DEBUG) || defined(NOSPARKLE)
|
||||||
self.checkIntervallPopupButton.enabled = NO;
|
self.checkIntervallPopupButton.enabled = NO;
|
||||||
self.automaticallyCheckForUpdatesCheckButton.enabled = NO;
|
self.automaticallyCheckForUpdatesCheckButton.enabled = NO;
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user