From ed762d126fe0745194caa876c43d71c07a90101f Mon Sep 17 00:00:00 2001 From: Subhankar Date: Wed, 18 Nov 2020 16:40:48 +0530 Subject: [PATCH 01/47] changes in access specifier --- MVMCoreUI/Atomic/Templates/TemplateModel.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Templates/TemplateModel.swift b/MVMCoreUI/Atomic/Templates/TemplateModel.swift index bb8bb104..2976134a 100644 --- a/MVMCoreUI/Atomic/Templates/TemplateModel.swift +++ b/MVMCoreUI/Atomic/Templates/TemplateModel.swift @@ -15,7 +15,7 @@ import Foundation // MARK: - Properties //-------------------------------------------------- - public class var identifier: String { + open class var identifier: String { return "" } @@ -76,7 +76,7 @@ import Foundation tabBarIndex = try typeContainer.decodeIfPresent(Int.self, forKey: .tabBarIndex) } - public func encode(to encoder: Encoder) throws { + open func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(pageType, forKey: .pageType) try container.encode(template, forKey: .template) From 2dcf922dfd51dbb6f575552152428fb1ac4d3fa9 Mon Sep 17 00:00:00 2001 From: rajampetS Date: Mon, 17 May 2021 16:26:53 +0530 Subject: [PATCH 02/47] molecule changes --- MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift | 8 +++++++- .../Molecules/HorizontalCombinationViews/Tabs.swift | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift index 4a596a35..9af5b062 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift @@ -8,6 +8,10 @@ import Foundation +public protocol RadioBoxSelectionDelegate: class { + func selectedRadioBox(text: String) +} + open class RadioBoxes: View { public var collectionView: CollectionView! @@ -19,7 +23,7 @@ open class RadioBoxes: View { private var radioBoxesModel: RadioBoxesModel? { return model as? RadioBoxesModel } - + public var radioDelegate: RadioBoxSelectionDelegate? private var delegateObject: MVMCoreUIDelegateObject? /// The models for the molecules. @@ -161,6 +165,8 @@ extension RadioBoxes: UICollectionViewDelegate { cell.radioBox.selectBox() _ = FormValidator.validate(delegate: delegateObject?.formHolderDelegate) cell.updateAccessibility() + guard let nu = boxes?[indexPath.row] else { return } + radioDelegate?.selectedRadioBox(text: nu.text) } open func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) { diff --git a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift index 1ddd9412..800fb7d1 100644 --- a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift +++ b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift @@ -13,7 +13,8 @@ import UIKit func didSelectItem(_ indexPath: IndexPath, tabs: Tabs) } -@objcMembers open class Tabs: View, MVMCoreUIViewConstrainingProtocol { +@objcMembers open class Tabs: View, MVMCoreUIViewConstrainingProtocol, MFButtonProtocol { + public var tabsModel: TabsModel? { get { return model as? TabsModel } @@ -81,9 +82,11 @@ import UIKit let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) collectionView.translatesAutoresizingMaskIntoConstraints = false collectionView.register(TabItemCell.self, forCellWithReuseIdentifier: TabCellId) + collectionView.isUserInteractionEnabled = true collectionView.backgroundColor = .clear collectionView.showsVerticalScrollIndicator = false collectionView.showsHorizontalScrollIndicator = false + collectionView.isScrollEnabled = true collectionView.dataSource = self collectionView.delegate = self addSubview(collectionView) @@ -120,6 +123,8 @@ import UIKit //bottom line bottomLine.topAnchor.constraint(equalTo: bottomScrollView.bottomAnchor).isActive = true; NSLayoutConstraint.constraintPinSubview(bottomLine, pinTop: false, pinBottom: true, pinLeft: true, pinRight: true) + + self.collectionView?.delegate = self } //------------------------------------------------- @@ -289,6 +294,7 @@ extension Tabs { public override func setupView() { super.setupView() contentView.addSubview(label) + contentView.isUserInteractionEnabled = true NSLayoutConstraint.constraintPinSubview(label, pinTop: false, topConstant: 0, pinBottom: true, bottomConstant: 6, pinLeft: true, leftConstant: 0, pinRight: true, rightConstant: 0) label.baselineAdjustment = .alignCenters } From 8d425862f5bbf56ee19473deb2f95299abc01393 Mon Sep 17 00:00:00 2001 From: rajampetS Date: Thu, 10 Jun 2021 11:43:01 +0530 Subject: [PATCH 03/47] editing the naming convention --- MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift index 7ca3056f..64b0644c 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift @@ -166,8 +166,8 @@ extension RadioBoxes: UICollectionViewDelegate { cell.radioBox.selectBox() _ = FormValidator.validate(delegate: delegateObject?.formHolderDelegate) cell.updateAccessibility() - guard let nu = boxes?[indexPath.row] else { return } - radioDelegate?.selectedRadioBox(text: nu.text) + guard let radioB = boxes?[indexPath.row] else { return } + radioDelegate?.selectedRadioBox(text: radioB.text) } open func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) { From 080c1c192fc770094b44a66459cce0d77d79f85f Mon Sep 17 00:00:00 2001 From: rajampetS Date: Thu, 17 Jun 2021 10:27:54 +0530 Subject: [PATCH 04/47] fixed as per kevin's comments(NBD Ar) --- MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift | 4 ++-- MVMCoreUI/Atomic/Templates/TemplateModel.swift | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift index 64b0644c..5d9136f4 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift @@ -166,8 +166,8 @@ extension RadioBoxes: UICollectionViewDelegate { cell.radioBox.selectBox() _ = FormValidator.validate(delegate: delegateObject?.formHolderDelegate) cell.updateAccessibility() - guard let radioB = boxes?[indexPath.row] else { return } - radioDelegate?.selectedRadioBox(text: radioB.text) + guard let radioBox = boxes?[indexPath.row] else { return } + radioDelegate?.selectedRadioBox(text: radioBox.text) } open func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) { diff --git a/MVMCoreUI/Atomic/Templates/TemplateModel.swift b/MVMCoreUI/Atomic/Templates/TemplateModel.swift index 5557d0f8..94a2476e 100644 --- a/MVMCoreUI/Atomic/Templates/TemplateModel.swift +++ b/MVMCoreUI/Atomic/Templates/TemplateModel.swift @@ -13,9 +13,7 @@ import Foundation //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- - open class var identifier: String { - return "" - } + open class var identifier: String { "" } public var pageType: String From e372195f1584b4abc201b068128af668e692ce23 Mon Sep 17 00:00:00 2001 From: rajampetS Date: Wed, 23 Jun 2021 11:01:49 +0530 Subject: [PATCH 05/47] Removed tab changes --- .../Atomic/Molecules/HorizontalCombinationViews/Tabs.swift | 5 ----- 1 file changed, 5 deletions(-) diff --git a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift index 7b59a6cb..804075ff 100644 --- a/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift +++ b/MVMCoreUI/Atomic/Molecules/HorizontalCombinationViews/Tabs.swift @@ -82,11 +82,9 @@ import UIKit let collectionView = UICollectionView(frame: .zero, collectionViewLayout: layout) collectionView.translatesAutoresizingMaskIntoConstraints = false collectionView.register(TabItemCell.self, forCellWithReuseIdentifier: TabCellId) - collectionView.isUserInteractionEnabled = true collectionView.backgroundColor = .clear collectionView.showsVerticalScrollIndicator = false collectionView.showsHorizontalScrollIndicator = false - collectionView.isScrollEnabled = true collectionView.dataSource = self collectionView.delegate = self addSubview(collectionView) @@ -123,8 +121,6 @@ import UIKit //bottom line bottomLine.topAnchor.constraint(equalTo: bottomScrollView.bottomAnchor).isActive = true; NSLayoutConstraint.constraintPinSubview(bottomLine, pinTop: false, pinBottom: true, pinLeft: true, pinRight: true) - - self.collectionView?.delegate = self } //------------------------------------------------- @@ -296,7 +292,6 @@ extension Tabs { public override func setupView() { super.setupView() contentView.addSubview(label) - contentView.isUserInteractionEnabled = true NSLayoutConstraint.constraintPinSubview(label, pinTop: false, topConstant: 0, pinBottom: true, bottomConstant: 6, pinLeft: true, leftConstant: 0, pinRight: true, rightConstant: 0) label.baselineAdjustment = .alignCenters } From ffa4719a950c120e643d249ef7352bc640cc3ccc Mon Sep 17 00:00:00 2001 From: rajampetS Date: Tue, 29 Jun 2021 13:54:49 +0530 Subject: [PATCH 06/47] moved image button to coreui --- MVMCoreUI.xcodeproj/project.pbxproj | 8 ++ .../Atomic/Atoms/Buttons/ImageButton.swift | 54 +++++++++++ .../Atoms/Buttons/ImageButtonModel.swift | 95 +++++++++++++++++++ .../OtherHandlers/CoreUIModelMapping.swift | 1 + 4 files changed, 158 insertions(+) create mode 100644 MVMCoreUI/Atomic/Atoms/Buttons/ImageButton.swift create mode 100644 MVMCoreUI/Atomic/Atoms/Buttons/ImageButtonModel.swift diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj index c9833c3f..15f22974 100644 --- a/MVMCoreUI.xcodeproj/project.pbxproj +++ b/MVMCoreUI.xcodeproj/project.pbxproj @@ -121,6 +121,8 @@ 0AE98BB323FF0934004C5109 /* ExternalLinkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE98BB223FF0934004C5109 /* ExternalLinkModel.swift */; }; 0AE98BB523FF18D2004C5109 /* Arrow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE98BB423FF18D2004C5109 /* Arrow.swift */; }; 0AE98BB723FF18E9004C5109 /* ArrowModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE98BB623FF18E9004C5109 /* ArrowModel.swift */; }; + 1D6D258826899B0C00DEBB08 /* ImageButtonModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6D258626899B0B00DEBB08 /* ImageButtonModel.swift */; }; + 1D6D258926899B0C00DEBB08 /* ImageButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D6D258726899B0B00DEBB08 /* ImageButton.swift */; }; 279B1569242BBC2F00921D6C /* ActionModelAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 279B1568242BBC2F00921D6C /* ActionModelAdapter.swift */; }; 27F6B08826051831008529AA /* MoleculeTreeTraversalProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27F6B08726051831008529AA /* MoleculeTreeTraversalProtocol.swift */; }; 27F6B08C26052AFF008529AA /* ParentMoleculeModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27F6B08B26052AFF008529AA /* ParentMoleculeModelProtocol.swift */; }; @@ -684,6 +686,8 @@ 0AE98BB223FF0934004C5109 /* ExternalLinkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalLinkModel.swift; sourceTree = ""; }; 0AE98BB423FF18D2004C5109 /* Arrow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Arrow.swift; sourceTree = ""; }; 0AE98BB623FF18E9004C5109 /* ArrowModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrowModel.swift; sourceTree = ""; }; + 1D6D258626899B0B00DEBB08 /* ImageButtonModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageButtonModel.swift; path = MVMCoreUI/Atomic/Atoms/Buttons/ImageButtonModel.swift; sourceTree = SOURCE_ROOT; }; + 1D6D258726899B0B00DEBB08 /* ImageButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageButton.swift; path = MVMCoreUI/Atomic/Atoms/Buttons/ImageButton.swift; sourceTree = SOURCE_ROOT; }; 279B1568242BBC2F00921D6C /* ActionModelAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionModelAdapter.swift; sourceTree = ""; }; 27F6B08726051831008529AA /* MoleculeTreeTraversalProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoleculeTreeTraversalProtocol.swift; sourceTree = ""; }; 27F6B08B26052AFF008529AA /* ParentMoleculeModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParentMoleculeModelProtocol.swift; sourceTree = ""; }; @@ -1289,6 +1293,8 @@ 0AE98BAD23FEF92B004C5109 /* Link */ = { isa = PBXGroup; children = ( + 1D6D258726899B0B00DEBB08 /* ImageButton.swift */, + 1D6D258626899B0B00DEBB08 /* ImageButtonModel.swift */, D28A838823CCCFCB00DFE4FC /* LinkModel.swift */, C07065C32395677300FBF997 /* Link.swift */, 0AE98BB223FF0934004C5109 /* ExternalLinkModel.swift */, @@ -2884,6 +2890,7 @@ D2C78CD224228BBD00B69FDE /* ActionOpenPanelModel.swift in Sources */, AA617AB02453010A00910B8F /* ListDeviceComplexLinkSmall.swift in Sources */, D23A8FD9260CE004007E14CE /* MFStyler+PaddingExtension.swift in Sources */, + 1D6D258926899B0C00DEBB08 /* ImageButton.swift in Sources */, C695A68123C9830D00BFB94E /* NumberedListModel.swift in Sources */, 01EB3684236097C0006832FA /* MoleculeModelProtocol.swift in Sources */, D27CD4102339057800C1DC07 /* EyebrowHeadlineBodyLink.swift in Sources */, @@ -2928,6 +2935,7 @@ BB2BF0EC2452A9D5001D0FC2 /* ListDeviceComplexButtonSmallModel.swift in Sources */, 943784F6236B77BB006A1E82 /* WheelAnimationHandler.swift in Sources */, 011D95A1240453D0000E3791 /* RuleEqualsModel.swift in Sources */, + 1D6D258826899B0C00DEBB08 /* ImageButtonModel.swift in Sources */, AA07EA912510A442009A2AE3 /* StarModel.swift in Sources */, D29DF2AA21E7B2F9003B2FB9 /* MVMCoreUIConstants.m in Sources */, 011D95892404249B000E3791 /* FormHolderModelProtocol.swift in Sources */, diff --git a/MVMCoreUI/Atomic/Atoms/Buttons/ImageButton.swift b/MVMCoreUI/Atomic/Atoms/Buttons/ImageButton.swift new file mode 100644 index 00000000..2d71ee6e --- /dev/null +++ b/MVMCoreUI/Atomic/Atoms/Buttons/ImageButton.swift @@ -0,0 +1,54 @@ +// +// ImageButton.swift +// MobileFirstFramework +// +// Created by Chintakrinda, Arun Kumar (Arun) on 07/10/20. +// Copyright © 2020 Verizon Wireless. All rights reserved. +// + +import Foundation + +@objcMembers open class ImageButton: Button { + + public let image = LoadImageView(pinnedEdges: .all) + + open override func setupView() { + super.setupView() + insertSubview(image, at: 0) + image.isUserInteractionEnabled = false + NSLayoutConstraint.constraintPinSubview(toSuperview: image) + } + + open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) { + guard let castModel = model as? ImageButtonModel else { + super.set(with: model, delegateObject, additionalData) + return + } + image.setOptional(with: castModel.image, delegateObject, additionalData) + castModel.updateUI = { [weak self] in + MVMCoreDispatchUtility.performBlock(onMainThread: { + self?.setState() + }) + } + + super.set(with: model, delegateObject, additionalData) + FormValidator.setupValidation(for: castModel, delegate: delegateObject?.formHolderDelegate) + + } + + private func setState() { + guard let castModel = model as? ImageButtonModel else { + return + } + if castModel.enabled { + if let enabledTintColor = castModel.enabledTintColor { + image.imageView.tintColor = enabledTintColor.uiColor + } + } else if let disabledTintColor = castModel.disabledTintColor { + image.imageView.tintColor = disabledTintColor.uiColor + } + } + + + +} diff --git a/MVMCoreUI/Atomic/Atoms/Buttons/ImageButtonModel.swift b/MVMCoreUI/Atomic/Atoms/Buttons/ImageButtonModel.swift new file mode 100644 index 00000000..d8217d0d --- /dev/null +++ b/MVMCoreUI/Atomic/Atoms/Buttons/ImageButtonModel.swift @@ -0,0 +1,95 @@ +// +// ImageButtonModel.swift +// MobileFirstFramework +// +// Created by Chintakrinda, Arun Kumar (Arun) on 07/10/20. +// Copyright © 2020 Verizon Wireless. All rights reserved. +// + +import Foundation + +open class ImageButtonModel: ButtonModelProtocol, MoleculeModelProtocol, FormGroupWatcherFieldProtocol, EnableableModelProtocol { + //-------------------------------------------------- + // MARK: - Properties + //-------------------------------------------------- + + public static var identifier: String = "imageButton" + public var backgroundColor: Color? + + public var image: ImageViewModel? + + public var accessibilityText: String? + public var action: ActionModelProtocol + public var enabled: Bool = true + public var enabledTintColor: Color? + public var disabledTintColor: Color? + + public var groupName: String = "" + + public func setValidity(_ valid: Bool, group: FormGroupRule) { + enabled = valid + updateUI?() + } + + public var updateUI: ActionBlock? + + public init(image: ImageViewModel?, action: ActionModelProtocol) { + self.image = image + self.action = action + } + + private enum CodingKeys: String, CodingKey { + case moleculeName + case image + case backgroundColor + case accessibilityText + case action + case enabled + case groupName + case enabledTintColor + case disabledTintColor + } + + //-------------------------------------------------- + // MARK: - Codec + //-------------------------------------------------- + + required public init(from decoder: Decoder) throws { + let typeContainer = try decoder.container(keyedBy: CodingKeys.self) + + backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) + image = try typeContainer.decodeIfPresent(ImageViewModel.self, forKey: .image) + accessibilityText = try typeContainer.decodeIfPresent(String.self, forKey: .accessibilityText) + action = try typeContainer.decodeModel(codingKey: .action) + + if let enabled = try typeContainer.decodeIfPresent(Bool.self, forKey: .enabled) { + self.enabled = enabled + } + + if let groupName = try typeContainer.decodeIfPresent(String.self, forKey: .groupName) { + self.groupName = groupName + } + + if let enabledTintColor = try typeContainer.decodeIfPresent(Color.self, forKey: .enabledTintColor) { + self.enabledTintColor = enabledTintColor + } + + if let disabledTintColor = try typeContainer.decodeIfPresent(Color.self, forKey: .disabledTintColor) { + self.disabledTintColor = disabledTintColor + } + + } + + public func encode(to encoder: Encoder) throws { + var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(moleculeName, forKey: .moleculeName) + try container.encodeIfPresent(image, forKey: .image) + try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor) + try container.encodeIfPresent(accessibilityText, forKey: .accessibilityText) + try container.encode(enabled, forKey: .enabled) + try container.encodeModel(action, forKey: .action) + try container.encodeIfPresent(groupName, forKey: .groupName) + try container.encodeIfPresent(enabledTintColor, forKey: .enabledTintColor) + try container.encodeIfPresent(disabledTintColor, forKey: .disabledTintColor) + } +} diff --git a/MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift b/MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift index 45d1b0c4..30e497ee 100644 --- a/MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift +++ b/MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift @@ -86,6 +86,7 @@ open class CoreUIModelMapping: ModelMapping { try? ModelRegistry.register(handler: HeadlineBodyLink.self, for: HeadlineBodyLinkModel.self) try? ModelRegistry.register(handler: HeadlineBodyButton.self, for: HeadlineBodyButtonModel.self) try? ModelRegistry.register(handler: BGImageHeadlineBodyButton.self, for: BGImageHeadlineBodyButtonModel.self) + try? ModelRegistry.register(handler: ImageButton.self, for: ImageButtonModel.self) try? ModelRegistry.register(handler: ThreeHeadlineBodyLink.self, for: ThreeHeadlineBodyLinkModel.self) // MARK:- Left Right Molecules From 9af3b5f71edebada66ab780e71921477ca0457a4 Mon Sep 17 00:00:00 2001 From: rajampetS Date: Wed, 30 Jun 2021 14:52:19 +0530 Subject: [PATCH 07/47] removing spaces --- MVMCoreUI/Atomic/Templates/TemplateModel.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Templates/TemplateModel.swift b/MVMCoreUI/Atomic/Templates/TemplateModel.swift index 94a2476e..45c2ed1a 100644 --- a/MVMCoreUI/Atomic/Templates/TemplateModel.swift +++ b/MVMCoreUI/Atomic/Templates/TemplateModel.swift @@ -13,8 +13,7 @@ import Foundation //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- - open class var identifier: String { "" } - + open class var identifier: String { "" } public var pageType: String public var template: String { From 14fc5bfd72edb3b3b1011a42de85c0c7e1f773bf Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 10:54:50 -0400 Subject: [PATCH 08/47] add aggregate --- MVMCoreUI.xcodeproj/project.pbxproj | 66 +++++++++++++++++++++ Scripts/download_dependencies.sh | 17 ++++++ Scripts/upload_core_frameworks.sh | 24 ++++++++ Scripts/upload_framework.sh | 90 +++++++++++++++++++++++++++++ 4 files changed, 197 insertions(+) create mode 100755 Scripts/download_dependencies.sh create mode 100755 Scripts/upload_core_frameworks.sh create mode 100755 Scripts/upload_framework.sh diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj index d48fa228..8a03744c 100644 --- a/MVMCoreUI.xcodeproj/project.pbxproj +++ b/MVMCoreUI.xcodeproj/project.pbxproj @@ -6,6 +6,20 @@ objectVersion = 48; objects = { +/* Begin PBXAggregateTarget section */ + D23F60FA268CBB5E007914AB /* MVMCoreUIAggregate */ = { + isa = PBXAggregateTarget; + buildConfigurationList = D23F60FD268CBB5E007914AB /* Build configuration list for PBXAggregateTarget "MVMCoreUIAggregate" */; + buildPhases = ( + D23F6100268CBB71007914AB /* ShellScript */, + ); + dependencies = ( + ); + name = MVMCoreUIAggregate; + productName = MVMCoreUIAggregate; + }; +/* End PBXAggregateTarget section */ + /* Begin PBXBuildFile section */ 01004F3022721C3800991ECC /* RadioButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01004F2F22721C3800991ECC /* RadioButton.swift */; }; 0103B84E23D7E33A009C315C /* HeadlineBodyToggleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0103B84D23D7E33A009C315C /* HeadlineBodyToggleModel.swift */; }; @@ -2469,6 +2483,10 @@ LastUpgradeCheck = 1010; ORGANIZATIONNAME = "Verizon Wireless"; TargetAttributes = { + D23F60FA268CBB5E007914AB = { + CreatedOnToolsVersion = 12.4; + ProvisioningStyle = Automatic; + }; D29DF0CB21E404D4003B2FB9 = { CreatedOnToolsVersion = 10.1; LastSwiftMigration = 1010; @@ -2491,6 +2509,7 @@ projectRoot = ""; targets = ( D29DF0CB21E404D4003B2FB9 /* MVMCoreUI */, + D23F60FA268CBB5E007914AB /* MVMCoreUIAggregate */, ); }; /* End PBXProject section */ @@ -2513,6 +2532,26 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + D23F6100268CBB71007914AB /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode\n\n# define output folder environment variable\nC_PROJECT_NAME=\"MVMCoreUI\"\nPHONE_CONFIGURATION=\"Release\"\nSIMULATOR_CONFIGURATION=\"Debug\"\n\nUNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal\n\n# Step 1. Build Device and Simulator versions\nxcodebuild -scheme \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath \"${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}\" archive SKIP_INSTALL=false\n\nxcodebuild -target \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR=\"${BUILD_DIR}\"\n\nmkdir -p \"${UNIVERSAL_OUTPUTFOLDER}\"\n\nrm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework\ncp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/\"${C_PROJECT_NAME}\".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER}\n\n# Step 2. Create universal binary file using lipo\n\nlipo -create -output \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}\" \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\" \"${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\"\n\nmv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\n"; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ D29DF0C821E404D4003B2FB9 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -3042,6 +3081,24 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ + D23F60FB268CBB5E007914AB /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = FCMA4QKS77; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + D23F60FC268CBB5E007914AB /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = FCMA4QKS77; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; D29DF0D221E404D4003B2FB9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3221,6 +3278,15 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + D23F60FD268CBB5E007914AB /* Build configuration list for PBXAggregateTarget "MVMCoreUIAggregate" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D23F60FB268CBB5E007914AB /* Debug */, + D23F60FC268CBB5E007914AB /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; D29DF0C621E404D4003B2FB9 /* Build configuration list for PBXProject "MVMCoreUI" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh new file mode 100755 index 00000000..dfa64ff5 --- /dev/null +++ b/Scripts/download_dependencies.sh @@ -0,0 +1,17 @@ +#!/bin/sh -e + +# download_dependencies.sh +# +# Downloads all compiled framework flavors in from Artifactory. +# +# + +# Create new aggregate builds + +if [ -z $ARTIFACTORY_URL ]; then + ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" +fi + +# Remote View Versions +BUILD_DIR=$(xcodebuild -showBuildSettings -project ../MVMCore/MVMCore.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) +./upload_framework.sh $ARTIFACTORY_URL "${BUILD_DIR}/universal/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/[VER]/MVMCore-[VER]-Debug-SNAPSHOT diff --git a/Scripts/upload_core_frameworks.sh b/Scripts/upload_core_frameworks.sh new file mode 100755 index 00000000..714cf163 --- /dev/null +++ b/Scripts/upload_core_frameworks.sh @@ -0,0 +1,24 @@ +#!/bin/sh -e + +# upload_core_frameworks.sh +# +# Uploads all compiled framework flavors in MVMCore to Artifactory with the SNAPSHOT classifier. This is to avoid accidently clobbering a release build of a particular version. Remove the classifier in Artificatory to make a release. +# +# Copied from Hedden, Kyle Matthew on 3/2/18. +# + +FRAMEWORK_VERSION=$(cd ../MVMCore && agvtool vers -terse) +if [ $(git tag --list | grep "v${FRAMEWORK_VERSION}") ]; then + echo This version tag has already been committed! Aborting! + exit 1 +fi + +# Create new aggregate builds + +if [ -z $ARTIFACTORY_URL ]; then + ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" +fi + +# Remote View Versions +BUILD_DIR=$(xcodebuild -showBuildSettings -project ../MVMCore/MVMCore.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) +./upload_framework.sh $ARTIFACTORY_URL "${BUILD_DIR}/universal/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/[VER]/MVMCore-[VER]-Debug-SNAPSHOT diff --git a/Scripts/upload_framework.sh b/Scripts/upload_framework.sh new file mode 100755 index 00000000..94a6007b --- /dev/null +++ b/Scripts/upload_framework.sh @@ -0,0 +1,90 @@ +#!/bin/bash -e + +# upload_framework.sh +# +# Uploads an iOS framework to Artificatory given the local path as the first argument and the remote project name in Verizon OneArtifactory for the second argument. +# +# An API key from Artifcatory is required in the api_key.private file before uploading. +# +# The script will replace [VER] in the provided remote path with the version found in the framework bundle. +# +# Copied from Hedden, Kyle Matthew on 3/2/18. +# Copyright © 2018 Verizon. All rights reserved. + +URL=$1 +LOCALPATH=$2 +REMOTEPATH=$3 + +if [ -z $URL ]; then + echo "The artifactory instance url must be specified as the first argument!" + exit 1 +fi + +echo ">>> UPLOAD START <<<" +echo "Local path: ${LOCALPATH}" +echo "Remote path: ${REMOTEPATH}" + +cat "${LOCALPATH}/Info.plist" + +LOCALBASE=$(basename "${LOCALPATH}") +LOCALDIR=$(dirname "${LOCALPATH}") + +# Grab the framework version from the bundled Info.plist. +FRAMEWORKVER=$(/usr/libexec/plistbuddy -c "Print :CFBundleShortVersionString" "${LOCALPATH}/Info.plist") +echo -e "\nFramework version: \t${FRAMEWORKVER}" + +# Replace the [VER] placeholders with the found version. +REMOTEPATH="${REMOTEPATH//\[VER\]/$FRAMEWORKVER}" +echo -e "Resolved path: \t\t${REMOTEPATH}" + +if [ -z $ARTIFACTORY_APIKEY ]; then + # Read the API key from a private file. + read -r APIKEY < "api_key.private" +else + APIKEY=$ARTIFACTORY_APIKEY +fi + +if [ -z $APIKEY ]; then + read -p "Artifactory API Key:" APIKEY + echo $APIKEY >> api_key.private +fi + +echo -e "API Key: \t\t${APIKEY}" + +# Zip the framework & DSYM for uploading. +pushd $LOCALDIR +echo -e "---------\nZipping: \t\t${LOCALBASE}.zip" +zip -r -X "${LOCALBASE}.zip" $LOCALBASE +# Generate framework's SHA-1 checksum. +CHECKSUM=$(shasum -a 1 "${LOCALBASE}.zip" | cut -d " " -f 1) +echo -e "SHA-1 Checksum: \t${CHECKSUM}" +if [ -e ${LOCALBASE}.dSYM ]; then +echo -e "---------\nZipping: \t\t${LOCALBASE}.dSYM.zip" +zip -r -X "${LOCALBASE}.dSYM.zip" $LOCALBASE.dSYM +# Generate its SHA-1 checksum for dsym. +DSYM_CHECKSUM=$(shasum -a 1 "${LOCALBASE}.dSYM.zip" | cut -d " " -f 1) +echo -e "SHA-1 Checksum: \t${DSYM_CHECKSUM}" +fi +popd +mv ${LOCALPATH}.zip . +if [ -e ${LOCALPATH}.dSYM.zip ]; then +mv ${LOCALPATH}.dSYM.zip . +fi + +# Upload framework to Artifactory. +echo -e "---------\nUploading to: \t\t${URL}/${REMOTEPATH}.zip" +curl --header "X-JFrog-Art-Api: ${APIKEY}" --header "X-Checksum-Sha1: ${CHECKSUM}" -X PUT "${URL}/${REMOTEPATH}.zip" -T "${LOCALBASE}.zip" + +# Cleanup. +rm "${LOCALBASE}.zip" + +if [ -e ${LOCALBASE}.dSYM.zip ]; then +# Upload dsym Artifactory. +echo -e "---------\nUploading to: \t\t${URL}/${REMOTEPATH}.dSYM.zip" +curl --header "X-JFrog-Art-Api: ${APIKEY}" --header "X-Checksum-Sha1: ${DSYM_CHECKSUM}" -X PUT "${URL}/${REMOTEPATH}.dSYM.zip" -T "${LOCALBASE}.dSYM.zip" +# Cleanup dsym. +rm ${LOCALBASE}.dSYM.zip +fi + + +echo -e "\n\n<<< UPLOAD COMPLETE >>>\n\n" From 40785aee632440e1b32dfe0d4dd986f4f71a9e88 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 12:02:42 -0400 Subject: [PATCH 09/47] testing --- .gitlab-ci.yml | 92 +++++++++++++++++++++++++++++ MVMCoreUI.xcodeproj/project.pbxproj | 2 +- Scripts/download_dependencies.sh | 5 +- Scripts/download_framework.sh | 85 ++++++++++++++++++++++++++ 4 files changed, 180 insertions(+), 4 deletions(-) create mode 100644 .gitlab-ci.yml create mode 100755 Scripts/download_framework.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..20a59212 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,92 @@ +stages: +# - test + - download +# - build +# - deploy + +#test: +# stage: test +# script: +# - echo "This job tests something" +# tags: +# - xcode_12_2 + +download_artifacts: + stage: download + script: + - cd Scripts && ./download_dependencies.sh + # - ./Scripts/download_dependencies.sh + only: + - branches + - feature/script_to_upload + tags: + - bash_shell + environment: + name: oneartifactory + url: https://oneartifactoryprod.verizon.com/artifactory + variables: + ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory + +#build_project: +# stage: build +# script: +# - xcodebuild build -project MVMCore/MVMCore.xcodeproj -scheme FatLibrary | xcpretty +# - BUILD_DIR=$(xcodebuild -showBuildSettings -project MVMCore/MVMCore.xcodeproj | grep BUILD_DIR) +# only: +# - branches +# - develop +# tags: +# - xcode_12_2 +# +#deploy_snapshot: +# stage: deploy +# script: +# - cd Scripts && ./upload_core_frameworks.sh +# only: +# - branches +# - develop +# tags: +# - bash_shell +# environment: +# name: oneartifactory +# url: https://oneartifactoryprod.verizon.com/artifactory +# variables: +# ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory + +#promote_snapshot: +# stage: go live +# # Prevent artifacts from needing to re-download. Everything we need is in Artifactory. +# dependencies: [] +# script: +# # Grab the framework version from the xcode project. +# - framework_ver=$(cd RemoteView && agvtool vers -terse) +# - cd Scripts && ./promote_remote_view_frameworks.sh $framework_ver +# only: +# - tags +# tags: +# - bash_shell +# environment: +# name: oneartifactory +# url: https://oneartifactoryprod.verizon.com/artifactory +# variables: +# ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory +# +#create_version_tag: +# stage: tag +# when: manual +# # Prevent artifacts from needing to re-download. +# dependencies: [] +# script: +# # Grab the framework version from the xcode project and create a tag of the version. +# - framework_ver=$(cd RemoteView && agvtool vers -terse) +# - git tag -a "v${framework_ver}" -m "Version ${framework_ver} created by gitlab-ci Build" +# # Extract the git repo url to ssh version (git@gitlab.verizon.com) +# - ci_push_repo="git@${CI_SERVER_HOST}:${CI_PROJECT_PATH}.git" +# - echo $ci_push_repo +# # Set the remote url for pushing assuming the gitlab runner has SSH access to the repo. +# - git remote set-url --push origin $ci_push_repo +# - git push origin "v${framework_ver}" +# only: +# - develop +# tags: +# - bash_shell diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj index 9785a981..b53e6ceb 100644 --- a/MVMCoreUI.xcodeproj/project.pbxproj +++ b/MVMCoreUI.xcodeproj/project.pbxproj @@ -2545,7 +2545,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode\n\n# define output folder environment variable\nC_PROJECT_NAME=\"MVMCoreUI\"\nPHONE_CONFIGURATION=\"Release\"\nSIMULATOR_CONFIGURATION=\"Debug\"\n\nUNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal\n\n# Step 1. Build Device and Simulator versions\nxcodebuild -scheme \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath \"${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}\" archive SKIP_INSTALL=false\n\nxcodebuild -target \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR=\"${BUILD_DIR}\"\n\nmkdir -p \"${UNIVERSAL_OUTPUTFOLDER}\"\n\nrm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework\ncp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/\"${C_PROJECT_NAME}\".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER}\n\n# Step 2. Create universal binary file using lipo\n\nlipo -create -output \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}\" \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\" \"${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\"\n\nmv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\n"; + shellScript = "unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode\n\n# define output folder environment variable\nC_PROJECT_NAME=\"MVMCoreUI\"\nPHONE_CONFIGURATION=\"Release\"\nSIMULATOR_CONFIGURATION=\"Debug\"\n\nUNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal\n\n# Step 1. Build Device and Simulator versions\nxcodebuild -scheme \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath \"${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}\" archive SKIP_INSTALL=false\n\n#xcodebuild -target \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR=\"${BUILD_DIR}\"\n\n#mkdir -p \"${UNIVERSAL_OUTPUTFOLDER}\"\n\n#rm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework\n#cp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/\"${C_PROJECT_NAME}\".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER}\n\n# Step 2. Create universal binary file using lipo\n\n#lipo -create -output \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}\" \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\" \"${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\"\n\n#mv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index dfa64ff5..250bba40 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -4,7 +4,6 @@ # # Downloads all compiled framework flavors in from Artifactory. # -# # Create new aggregate builds @@ -13,5 +12,5 @@ if [ -z $ARTIFACTORY_URL ]; then fi # Remote View Versions -BUILD_DIR=$(xcodebuild -showBuildSettings -project ../MVMCore/MVMCore.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) -./upload_framework.sh $ARTIFACTORY_URL "${BUILD_DIR}/universal/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/[VER]/MVMCore-[VER]-Debug-SNAPSHOT +#BUILD_DIR=$(xcodebuild -showBuildSettings -project ../MVMCore/MVMCore.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) +./download_framework.sh $ARTIFACTORY_URL "./MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh new file mode 100755 index 00000000..cbcee2c9 --- /dev/null +++ b/Scripts/download_framework.sh @@ -0,0 +1,85 @@ +#!/bin/bash -e + +# upload_framework.sh +# +# Downloads an iOS framework from Artificatory. +# +# An API key from Artifcatory is required in the api_key.private file before uploading. +# + +URL=$1 +LOCALPATH="${2}" +REMOTEPATH="${3}" +LOGFILE=$3 +LOCALDIR=$(dirname "${LOCALPATH}") +LOCALBASE=$(basename "${LOCALPATH}") +NEWFILEPATH="${LOCALDIR}"/$(basename "${REMOTEPATH}") +VERSIONFILE=./Checksums/"${LOCALBASE}".txt + +if [ -z $URL ]; then + echo "The artifactory instance url must be specified as the first argument!" + exit 1 +fi + +if [ -z $LOGFILE ]; then +LOGFILE="/tmp/${LOCALBASE}.txt" +fi + +#first argument is error message. +exit_with_error () { +echo "Error: $1" >> "${LOGFILE}" +if [ -f "${NEWFILEPATH}" ]; then +rm -rf "${NEWFILEPATH}" 2>>"${LOGFILE}" +fi +exit 1 +} + +echo "----------------------------------------------------------" >> $LOGFILE +echo "Logs for ${LOCALBASE}" >> $LOGFILE + +echo -e "Local Target: ${LOCALPATH}" >> $LOGFILE +echo -e "Remote Source: ${REMOTEPATH}" >> $LOGFILE + +if [ -z "$LOCALPATH" ]; then +exit_with_error "Missing local path argument" +fi + +if [ -z "$REMOTEPATH" ]; then +exit_with_error "Missing filename path argument" +fi + +#get local and remote checksums for comparison +echo -e "Getting checksums..." >> $LOGFILE +echo -e "URL: ${URL}/api/storage/${REMOTEPATH}" >> $LOGFILE +JSON=$(curl --header "X-JFrog-Art-Api: ${APITOKEN}" -X GET "${URL}/api/storage/${REMOTEPATH}" 2>>"${LOGFILE}") +CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]') 2>>"${LOGFILE}" +if [[ -z "$CHECKSUM" ]]; then +exit_with_error "No Checksum found in json: ${JSON}" +fi +echo "Remote checksum ${CHECKSUM}" >> "${LOGFILE}" +OLDCHECKSUM=$(cat "${VERSIONFILE}" 2>/dev/null) +echo "Local checksum ${OLDCHECKSUM}" >> "${LOGFILE}" + +#get new framework if no original framework, no local checksum, or remote checksum is different from local. +if [ ! -e "${LOCALPATH}" ] || [ -z "$OLDCHECKSUM" ] || [ "$CHECKSUM" != "$OLDCHECKSUM" ]; then +echo "Downloading..." >> "${LOGFILE}" +echo -e "URL: ${URL}/${REMOTEPATH}" >> $LOGFILE +curl --header "X-JFrog-Art-Api: ${APITOKEN}" -f -X GET "$URL/$REMOTEPATH" --output "${NEWFILEPATH}" 2>>"${LOGFILE}" +if [ $? -eq 0 ] && [ -e "${NEWFILEPATH}" ]; then +echo "Finished Downloading, begin unzip" >> "${LOGFILE}" +unzip -q -o "${NEWFILEPATH}" -d "${LOCALDIR}" 2>>"${LOGFILE}" +if [ $? -eq 0 ]; then +echo "Finished unzipping, remove zip" >> "${LOGFILE}" +rm -rf "${NEWFILEPATH}" 2>>"${LOGFILE}" +echo "Writing new checksum to file" >> "${LOGFILE}" +echo "${CHECKSUM}" > "${VERSIONFILE}" 2>>"${LOGFILE}" +echo "Successfully downloaded and unzipped archive." >> "${LOGFILE}" +else +exit_with_error "Error unzipping" +fi +else +exit_with_error "Failed to download" +fi +else +echo "Successful, No New Version" >> "${LOGFILE}" +fi From 3b258efefec82333916ff93243be950888f71293 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 12:07:20 -0400 Subject: [PATCH 10/47] testing --- Scripts/download_framework.sh | 50 ++++++++++++++++------------------- 1 file changed, 23 insertions(+), 27 deletions(-) diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index cbcee2c9..079deed0 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -21,24 +21,20 @@ if [ -z $URL ]; then exit 1 fi -if [ -z $LOGFILE ]; then -LOGFILE="/tmp/${LOCALBASE}.txt" -fi - #first argument is error message. exit_with_error () { -echo "Error: $1" >> "${LOGFILE}" +echo "Error: $1" if [ -f "${NEWFILEPATH}" ]; then -rm -rf "${NEWFILEPATH}" 2>>"${LOGFILE}" +rm -rf "${NEWFILEPATH}" 2 fi exit 1 } -echo "----------------------------------------------------------" >> $LOGFILE -echo "Logs for ${LOCALBASE}" >> $LOGFILE +echo "----------------------------------------------------------" +echo "Logs for ${LOCALBASE}" -echo -e "Local Target: ${LOCALPATH}" >> $LOGFILE -echo -e "Remote Source: ${REMOTEPATH}" >> $LOGFILE +echo -e "Local Target: ${LOCALPATH}" +echo -e "Remote Source: ${REMOTEPATH}" if [ -z "$LOCALPATH" ]; then exit_with_error "Missing local path argument" @@ -49,31 +45,31 @@ exit_with_error "Missing filename path argument" fi #get local and remote checksums for comparison -echo -e "Getting checksums..." >> $LOGFILE -echo -e "URL: ${URL}/api/storage/${REMOTEPATH}" >> $LOGFILE -JSON=$(curl --header "X-JFrog-Art-Api: ${APITOKEN}" -X GET "${URL}/api/storage/${REMOTEPATH}" 2>>"${LOGFILE}") -CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]') 2>>"${LOGFILE}" +echo -e "Getting checksums..." +echo -e "URL: ${URL}/api/storage/${REMOTEPATH}" +JSON=$(curl --header "X-JFrog-Art-Api: ${APITOKEN}" -X GET "${URL}/api/storage/${REMOTEPATH}") +CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]')" if [[ -z "$CHECKSUM" ]]; then exit_with_error "No Checksum found in json: ${JSON}" fi -echo "Remote checksum ${CHECKSUM}" >> "${LOGFILE}" +echo "Remote checksum ${CHECKSUM}" OLDCHECKSUM=$(cat "${VERSIONFILE}" 2>/dev/null) -echo "Local checksum ${OLDCHECKSUM}" >> "${LOGFILE}" +echo "Local checksum ${OLDCHECKSUM}" #get new framework if no original framework, no local checksum, or remote checksum is different from local. if [ ! -e "${LOCALPATH}" ] || [ -z "$OLDCHECKSUM" ] || [ "$CHECKSUM" != "$OLDCHECKSUM" ]; then -echo "Downloading..." >> "${LOGFILE}" -echo -e "URL: ${URL}/${REMOTEPATH}" >> $LOGFILE -curl --header "X-JFrog-Art-Api: ${APITOKEN}" -f -X GET "$URL/$REMOTEPATH" --output "${NEWFILEPATH}" 2>>"${LOGFILE}" +echo "Downloading..." +echo -e "URL: ${URL}/${REMOTEPATH}" +curl --header "X-JFrog-Art-Api: ${APITOKEN}" -f -X GET "$URL/$REMOTEPATH" --output "${NEWFILEPATH}" if [ $? -eq 0 ] && [ -e "${NEWFILEPATH}" ]; then -echo "Finished Downloading, begin unzip" >> "${LOGFILE}" -unzip -q -o "${NEWFILEPATH}" -d "${LOCALDIR}" 2>>"${LOGFILE}" +echo "Finished Downloading, begin unzip" +unzip -q -o "${NEWFILEPATH}" -d "${LOCALDIR}" if [ $? -eq 0 ]; then -echo "Finished unzipping, remove zip" >> "${LOGFILE}" -rm -rf "${NEWFILEPATH}" 2>>"${LOGFILE}" -echo "Writing new checksum to file" >> "${LOGFILE}" -echo "${CHECKSUM}" > "${VERSIONFILE}" 2>>"${LOGFILE}" -echo "Successfully downloaded and unzipped archive." >> "${LOGFILE}" +echo "Finished unzipping, remove zip" +rm -rf "${NEWFILEPATH}" +echo "Writing new checksum to file" +echo "${CHECKSUM}" > "${VERSIONFILE}" +echo "Successfully downloaded and unzipped archive." else exit_with_error "Error unzipping" fi @@ -81,5 +77,5 @@ else exit_with_error "Failed to download" fi else -echo "Successful, No New Version" >> "${LOGFILE}" +echo "Successful, No New Version" fi From 291a956bdd98e870bad8d88b758783420596f166 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 12:10:33 -0400 Subject: [PATCH 11/47] testing --- Scripts/download_framework.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index 079deed0..e4f97a2b 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -48,7 +48,7 @@ fi echo -e "Getting checksums..." echo -e "URL: ${URL}/api/storage/${REMOTEPATH}" JSON=$(curl --header "X-JFrog-Art-Api: ${APITOKEN}" -X GET "${URL}/api/storage/${REMOTEPATH}") -CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]')" +CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]') if [[ -z "$CHECKSUM" ]]; then exit_with_error "No Checksum found in json: ${JSON}" fi From 9a90b6d96bc0e7e0136c22db0c59df759246c3b6 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 12:12:00 -0400 Subject: [PATCH 12/47] testing --- Scripts/download_framework.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index e4f97a2b..45a4b416 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -48,6 +48,7 @@ fi echo -e "Getting checksums..." echo -e "URL: ${URL}/api/storage/${REMOTEPATH}" JSON=$(curl --header "X-JFrog-Art-Api: ${APITOKEN}" -X GET "${URL}/api/storage/${REMOTEPATH}") +echo "$JSON" CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]') if [[ -z "$CHECKSUM" ]]; then exit_with_error "No Checksum found in json: ${JSON}" From 6808076d8d5b4ddc25f8db4fb664220d09149bbe Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 12:13:57 -0400 Subject: [PATCH 13/47] testing --- Scripts/download_dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 250bba40..76fb5db9 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -13,4 +13,4 @@ fi # Remote View Versions #BUILD_DIR=$(xcodebuild -showBuildSettings -project ../MVMCore/MVMCore.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) -./download_framework.sh $ARTIFACTORY_URL "./MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT +./download_framework.sh $ARTIFACTORY_URL "./MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip From 00a29ccc5dee8927a46d043821b94bd33b4432fe Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 12:38:57 -0400 Subject: [PATCH 14/47] testing --- Scripts/download_framework.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index 45a4b416..1d52486a 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -54,7 +54,11 @@ if [[ -z "$CHECKSUM" ]]; then exit_with_error "No Checksum found in json: ${JSON}" fi echo "Remote checksum ${CHECKSUM}" -OLDCHECKSUM=$(cat "${VERSIONFILE}" 2>/dev/null) +if [[ -f "${VERSIONFILE}" ]]; then +OLDCHECKSUM=$(cat "${VERSIONFILE}") +else +OLDCHECKSUM="none" +fi echo "Local checksum ${OLDCHECKSUM}" #get new framework if no original framework, no local checksum, or remote checksum is different from local. From 60b67e33509478754405b23d39be85144a65a539 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 16:39:02 -0400 Subject: [PATCH 15/47] testing --- Scripts/download_framework.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index 1d52486a..27e408c4 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -58,6 +58,7 @@ if [[ -f "${VERSIONFILE}" ]]; then OLDCHECKSUM=$(cat "${VERSIONFILE}") else OLDCHECKSUM="none" +mkdir -p $(dirname ${VERSIONFILE}) && touch "$VERSIONFILE" fi echo "Local checksum ${OLDCHECKSUM}" From 323d44deb6ffa55499debee95f974ec00e6126d4 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 17:14:45 -0400 Subject: [PATCH 16/47] build and deploy --- .gitlab-ci.yml | 56 ++++++++++++++-------------- Scripts/build_aggregate.sh | 26 +++++++++++++ Scripts/download_dependencies.sh | 7 +++- Scripts/upload_core_frameworks.sh | 24 ------------ Scripts/upload_core_ui_frameworks.sh | 24 ++++++++++++ 5 files changed, 82 insertions(+), 55 deletions(-) create mode 100755 Scripts/build_aggregate.sh delete mode 100755 Scripts/upload_core_frameworks.sh create mode 100755 Scripts/upload_core_ui_frameworks.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 20a59212..006d149e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,8 @@ stages: # - test - download -# - build -# - deploy + - build + - deploy #test: # stage: test @@ -14,8 +14,7 @@ stages: download_artifacts: stage: download script: - - cd Scripts && ./download_dependencies.sh - # - ./Scripts/download_dependencies.sh + - ./Scripts/download_dependencies.sh only: - branches - feature/script_to_upload @@ -27,31 +26,30 @@ download_artifacts: variables: ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory -#build_project: -# stage: build -# script: -# - xcodebuild build -project MVMCore/MVMCore.xcodeproj -scheme FatLibrary | xcpretty -# - BUILD_DIR=$(xcodebuild -showBuildSettings -project MVMCore/MVMCore.xcodeproj | grep BUILD_DIR) -# only: -# - branches -# - develop -# tags: -# - xcode_12_2 -# -#deploy_snapshot: -# stage: deploy -# script: -# - cd Scripts && ./upload_core_frameworks.sh -# only: -# - branches -# - develop -# tags: -# - bash_shell -# environment: -# name: oneartifactory -# url: https://oneartifactoryprod.verizon.com/artifactory -# variables: -# ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory +build_project: + stage: build + script: + - ./Scripts/build_aggregate.sh + only: + - branches + - develop + tags: + - xcode_12_2 + +deploy_snapshot: + stage: deploy + script: + - cd Scripts && ./upload_core_ui_frameworks.sh + only: + - branches + - develop + tags: + - bash_shell + environment: + name: oneartifactory + url: https://oneartifactoryprod.verizon.com/artifactory + variables: + ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory #promote_snapshot: # stage: go live diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh new file mode 100755 index 00000000..ec355f66 --- /dev/null +++ b/Scripts/build_aggregate.sh @@ -0,0 +1,26 @@ +unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode + +# define output folder environment variable +C_PROJECT_NAME="MVMCoreUI" +PHONE_CONFIGURATION="Release" +SIMULATOR_CONFIGURATION="Debug" + +BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) + +UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal + +# Step 1. Build Device and Simulator versions +xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=./Frameworks + +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR="${BUILD_DIR}" FRAMEWORK_SEARCH_PATHS=./Frameworks + +mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" + +rm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework +cp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/"${C_PROJECT_NAME}".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER} + +# Step 2. Create universal binary file using lipo + +lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}" "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" + +mv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME} diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 76fb5db9..3aa8e879 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -11,6 +11,9 @@ if [ -z $ARTIFACTORY_URL ]; then ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" fi +[ ! -d "./Frameworks" ] && echo mkdir "Frameworks" + # Remote View Versions -#BUILD_DIR=$(xcodebuild -showBuildSettings -project ../MVMCore/MVMCore.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) -./download_framework.sh $ARTIFACTORY_URL "./MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip +./Scripts/download_framework.sh $ARTIFACTORY_URL "./Frameworks/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip + +./Scripts/download_framework.sh $ARTIFACTORY_URL "./Frameworks/MVMAnimationFramework.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMAnimationFramework.framework/1.9/MVMAnimationFramework.framework-1.9.zip diff --git a/Scripts/upload_core_frameworks.sh b/Scripts/upload_core_frameworks.sh deleted file mode 100755 index 714cf163..00000000 --- a/Scripts/upload_core_frameworks.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -e - -# upload_core_frameworks.sh -# -# Uploads all compiled framework flavors in MVMCore to Artifactory with the SNAPSHOT classifier. This is to avoid accidently clobbering a release build of a particular version. Remove the classifier in Artificatory to make a release. -# -# Copied from Hedden, Kyle Matthew on 3/2/18. -# - -FRAMEWORK_VERSION=$(cd ../MVMCore && agvtool vers -terse) -if [ $(git tag --list | grep "v${FRAMEWORK_VERSION}") ]; then - echo This version tag has already been committed! Aborting! - exit 1 -fi - -# Create new aggregate builds - -if [ -z $ARTIFACTORY_URL ]; then - ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" -fi - -# Remote View Versions -BUILD_DIR=$(xcodebuild -showBuildSettings -project ../MVMCore/MVMCore.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) -./upload_framework.sh $ARTIFACTORY_URL "${BUILD_DIR}/universal/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/[VER]/MVMCore-[VER]-Debug-SNAPSHOT diff --git a/Scripts/upload_core_ui_frameworks.sh b/Scripts/upload_core_ui_frameworks.sh new file mode 100755 index 00000000..4a16396c --- /dev/null +++ b/Scripts/upload_core_ui_frameworks.sh @@ -0,0 +1,24 @@ +#!/bin/sh -e + +# upload_core_ui_frameworks.sh +# +# Uploads all compiled framework flavors in MVMCoreUI to Artifactory with the SNAPSHOT classifier. This is to avoid accidently clobbering a release build of a particular version. Remove the classifier in Artificatory to make a release. +# +# Copied from Hedden, Kyle Matthew on 3/2/18. +# + +FRAMEWORK_VERSION=$(cd .. && agvtool vers -terse) +if [ $(git tag --list | grep "v${FRAMEWORK_VERSION}") ]; then + echo This version tag has already been committed! Aborting! + exit 1 +fi + +# Create new aggregate builds + +if [ -z $ARTIFACTORY_URL ]; then + ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" +fi + +# Upload +BUILD_DIR=$(xcodebuild -showBuildSettings -project ../MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) +./upload_framework.sh $ARTIFACTORY_URL "${BUILD_DIR}/universal/MVMCoreUI.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCoreUI/[VER]/MVMCoreUI-[VER]-Debug-SNAPSHOT From de8c4b8e8d876a7473c6c9bbfed6ab8e46345088 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 17:18:29 -0400 Subject: [PATCH 17/47] build and deploy --- Scripts/download_dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 3aa8e879..5bf6342d 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -11,7 +11,7 @@ if [ -z $ARTIFACTORY_URL ]; then ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" fi -[ ! -d "./Frameworks" ] && echo mkdir "Frameworks" +[ ! -d "./Frameworks" ] && mkdir "Frameworks" # Remote View Versions ./Scripts/download_framework.sh $ARTIFACTORY_URL "./Frameworks/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip From 67e2ccafb4a4efea7bcdfdc261f4fdbbc7c3e396 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 17:22:05 -0400 Subject: [PATCH 18/47] build and deploy --- Scripts/download_dependencies.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 5bf6342d..5fbcc8ad 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -11,7 +11,12 @@ if [ -z $ARTIFACTORY_URL ]; then ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" fi -[ ! -d "./Frameworks" ] && mkdir "Frameworks" +if [ ! -d "./Frameworks" ]; then +echo "make frameworks folder at $(pwd)/Frameworks" +mkdir "Frameworks" +else +pwd +fi # Remote View Versions ./Scripts/download_framework.sh $ARTIFACTORY_URL "./Frameworks/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip From be01a1c2b3b67d8732f33ce8774d6875707c7b35 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 17:24:42 -0400 Subject: [PATCH 19/47] build and deploy --- Scripts/download_dependencies.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 5fbcc8ad..7ef0e7be 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -13,7 +13,8 @@ fi if [ ! -d "./Frameworks" ]; then echo "make frameworks folder at $(pwd)/Frameworks" -mkdir "Frameworks" +mkdir "./Frameworks" +ls else pwd fi From b86c1994d868e2a6e86c8a183ce2157548e5f81a Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 17:28:23 -0400 Subject: [PATCH 20/47] build and deploy --- Scripts/download_dependencies.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 7ef0e7be..74da129b 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -14,7 +14,7 @@ fi if [ ! -d "./Frameworks" ]; then echo "make frameworks folder at $(pwd)/Frameworks" mkdir "./Frameworks" -ls +ls "./" else pwd fi @@ -23,3 +23,5 @@ fi ./Scripts/download_framework.sh $ARTIFACTORY_URL "./Frameworks/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip ./Scripts/download_framework.sh $ARTIFACTORY_URL "./Frameworks/MVMAnimationFramework.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMAnimationFramework.framework/1.9/MVMAnimationFramework.framework-1.9.zip + +ls "./Frameworks" From 794e5ea5534d4424f4aa32b67842fcf32752487d Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Wed, 30 Jun 2021 17:40:01 -0400 Subject: [PATCH 21/47] build and deploy --- Scripts/build_aggregate.sh | 5 +++-- Scripts/download_dependencies.sh | 18 +++++++----------- Scripts/download_framework.sh | 2 +- 3 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index ec355f66..a9fb4d3a 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -6,13 +6,14 @@ PHONE_CONFIGURATION="Release" SIMULATOR_CONFIGURATION="Debug" BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) +FRAMEWORKS_DIR=$BUILD_DIR/Frameworks UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions -xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=./Frameworks +xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR="${BUILD_DIR}" FRAMEWORK_SEARCH_PATHS=./Frameworks +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR="${BUILD_DIR}" FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 74da129b..66742216 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -11,17 +11,13 @@ if [ -z $ARTIFACTORY_URL ]; then ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" fi -if [ ! -d "./Frameworks" ]; then -echo "make frameworks folder at $(pwd)/Frameworks" -mkdir "./Frameworks" -ls "./" -else -pwd +BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) +FRAMEWORKS_DIR=$BUILD_DIR/Frameworks + +if [ ! -d $FRAMEWORKS_DIR ]; then +mkdir $FRAMEWORKS_DIR fi -# Remote View Versions -./Scripts/download_framework.sh $ARTIFACTORY_URL "./Frameworks/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip +./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip -./Scripts/download_framework.sh $ARTIFACTORY_URL "./Frameworks/MVMAnimationFramework.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMAnimationFramework.framework/1.9/MVMAnimationFramework.framework-1.9.zip - -ls "./Frameworks" +./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/MVMAnimationFramework.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMAnimationFramework.framework/1.9/MVMAnimationFramework.framework-1.9.zip diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index 27e408c4..f4a18693 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -14,7 +14,7 @@ LOGFILE=$3 LOCALDIR=$(dirname "${LOCALPATH}") LOCALBASE=$(basename "${LOCALPATH}") NEWFILEPATH="${LOCALDIR}"/$(basename "${REMOTEPATH}") -VERSIONFILE=./Checksums/"${LOCALBASE}".txt +VERSIONFILE=$LOCALDIR/../Checksums/"${LOCALBASE}".txt if [ -z $URL ]; then echo "The artifactory instance url must be specified as the first argument!" From a1ba6cd7b1de805814e42973f48f27080a4fb43e Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 09:22:41 -0400 Subject: [PATCH 22/47] build and deploy --- MVMCoreUI.xcodeproj/project.pbxproj | 2 +- Scripts/build_aggregate.sh | 2 +- Scripts/download_framework.sh | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj index b53e6ceb..9785a981 100644 --- a/MVMCoreUI.xcodeproj/project.pbxproj +++ b/MVMCoreUI.xcodeproj/project.pbxproj @@ -2545,7 +2545,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode\n\n# define output folder environment variable\nC_PROJECT_NAME=\"MVMCoreUI\"\nPHONE_CONFIGURATION=\"Release\"\nSIMULATOR_CONFIGURATION=\"Debug\"\n\nUNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal\n\n# Step 1. Build Device and Simulator versions\nxcodebuild -scheme \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath \"${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}\" archive SKIP_INSTALL=false\n\n#xcodebuild -target \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR=\"${BUILD_DIR}\"\n\n#mkdir -p \"${UNIVERSAL_OUTPUTFOLDER}\"\n\n#rm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework\n#cp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/\"${C_PROJECT_NAME}\".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER}\n\n# Step 2. Create universal binary file using lipo\n\n#lipo -create -output \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}\" \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\" \"${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\"\n\n#mv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\n"; + shellScript = "unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode\n\n# define output folder environment variable\nC_PROJECT_NAME=\"MVMCoreUI\"\nPHONE_CONFIGURATION=\"Release\"\nSIMULATOR_CONFIGURATION=\"Debug\"\n\nUNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal\n\n# Step 1. Build Device and Simulator versions\nxcodebuild -scheme \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath \"${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}\" archive SKIP_INSTALL=false\n\nxcodebuild -target \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR=\"${BUILD_DIR}\"\n\nmkdir -p \"${UNIVERSAL_OUTPUTFOLDER}\"\n\nrm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework\ncp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/\"${C_PROJECT_NAME}\".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER}\n\n# Step 2. Create universal binary file using lipo\n\nlipo -create -output \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}\" \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\" \"${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\"\n\nmv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index a9fb4d3a..7b5a57c7 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -13,7 +13,7 @@ UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR="${BUILD_DIR}" FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index f4a18693..a9660d7f 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -48,7 +48,6 @@ fi echo -e "Getting checksums..." echo -e "URL: ${URL}/api/storage/${REMOTEPATH}" JSON=$(curl --header "X-JFrog-Art-Api: ${APITOKEN}" -X GET "${URL}/api/storage/${REMOTEPATH}") -echo "$JSON" CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]') if [[ -z "$CHECKSUM" ]]; then exit_with_error "No Checksum found in json: ${JSON}" From 997a3c96b74bb9a847d7ef6414da8f580fc6185b Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 09:33:35 -0400 Subject: [PATCH 23/47] build and deploy --- Scripts/build_aggregate.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 7b5a57c7..8f8d4e6e 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -7,6 +7,7 @@ SIMULATOR_CONFIGURATION="Debug" BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) FRAMEWORKS_DIR=$BUILD_DIR/Frameworks +echo $FRAMEWORKS_DIR UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal From dafe8e316043e8f21b802404de8b23d8549aa401 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 11:44:33 -0400 Subject: [PATCH 24/47] build and deploy --- Scripts/build_aggregate.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 8f8d4e6e..17dc2151 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -14,6 +14,8 @@ UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR +#copy the framework into the build directory where it is looking for it. +ditto $FRAMEWORKS_DIR/MVMCore.framework "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" From 143fe459c21b7698179f7014542e4e5771226ab6 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 12:11:12 -0400 Subject: [PATCH 25/47] build and deploy --- Scripts/build_aggregate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 17dc2151..762969ca 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -15,8 +15,8 @@ UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR #copy the framework into the build directory where it is looking for it. -ditto $FRAMEWORKS_DIR/MVMCore.framework "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR +#ditto "$FRAMEWORKS_DIR/MVMCore.framework" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" From 119399b6745c4ef5cc02e05081702c522f4b5035 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 12:16:01 -0400 Subject: [PATCH 26/47] build and deploy --- Scripts/build_aggregate.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 762969ca..38da239e 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -11,6 +11,8 @@ echo $FRAMEWORKS_DIR UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal +xcodebuild -project ./MVMCoreUI.xcodeproj -clean + # Step 1. Build Device and Simulator versions xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR From 3b0a2b3b32a838373bf3804dc5f7799f2d5b0bcb Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 12:22:11 -0400 Subject: [PATCH 27/47] build and deploy --- Scripts/build_aggregate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 38da239e..f90bf01c 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -11,7 +11,7 @@ echo $FRAMEWORKS_DIR UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal -xcodebuild -project ./MVMCoreUI.xcodeproj -clean +xcodebuild -project ./MVMCoreUI.xcodeproj clean # Step 1. Build Device and Simulator versions xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR From 9f7dbbb1bf09a62b3a704e9e3fe4211f0d5868c0 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 12:30:41 -0400 Subject: [PATCH 28/47] build and deploy --- Scripts/build_aggregate.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index f90bf01c..312133e9 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -11,10 +11,8 @@ echo $FRAMEWORKS_DIR UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal -xcodebuild -project ./MVMCoreUI.xcodeproj clean - # Step 1. Build Device and Simulator versions -xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR +xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false #copy the framework into the build directory where it is looking for it. #ditto "$FRAMEWORKS_DIR/MVMCore.framework" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework From 10818afbdfcbebb85f2dc596f0b3958d2f419dde Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 12:36:42 -0400 Subject: [PATCH 29/47] build and deploy --- Scripts/build_aggregate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 312133e9..762969ca 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -12,7 +12,7 @@ echo $FRAMEWORKS_DIR UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions -xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false +xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR #copy the framework into the build directory where it is looking for it. #ditto "$FRAMEWORKS_DIR/MVMCore.framework" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework From 12f8ea8130e7812a25b20cfeeaf02e8199e235c6 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 13:00:54 -0400 Subject: [PATCH 30/47] build and deploy --- Scripts/build_aggregate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 762969ca..8bcb83f0 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -16,7 +16,7 @@ xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHON #copy the framework into the build directory where it is looking for it. #ditto "$FRAMEWORKS_DIR/MVMCore.framework" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" From 5732fbc9492b68dea65c423c1c633631c570bc66 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 13:05:21 -0400 Subject: [PATCH 31/47] build and deploy --- Scripts/build_aggregate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 8bcb83f0..a774a1cf 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -16,7 +16,7 @@ xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHON #copy the framework into the build directory where it is looking for it. #ditto "$FRAMEWORKS_DIR/MVMCore.framework" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" From d26a8a2a1bf3367d1559a4e59cf8b68906122080 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 13:11:49 -0400 Subject: [PATCH 32/47] build and deploy --- Scripts/build_aggregate.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index a774a1cf..f73cde7d 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -12,19 +12,19 @@ echo $FRAMEWORKS_DIR UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions -xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR +#xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true #copy the framework into the build directory where it is looking for it. #ditto "$FRAMEWORKS_DIR/MVMCore.framework" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true -mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" - -rm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework -cp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/"${C_PROJECT_NAME}".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER} - -# Step 2. Create universal binary file using lipo - -lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}" "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" - -mv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME} +#mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" +# +#rm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework +#cp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/"${C_PROJECT_NAME}".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER} +# +## Step 2. Create universal binary file using lipo +# +#lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}" "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" +# +#mv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME} From 83a6b21ce644e7be0d7481ea0ac41d95ddada3e3 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 13:12:25 -0400 Subject: [PATCH 33/47] build and deploy --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 006d149e..17444e42 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ stages: # - test - - download +# - download - build - deploy From 37967a447a4a2e0663bcade766e0579df7189811 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 13:15:09 -0400 Subject: [PATCH 34/47] build and deploy --- .gitlab-ci.yml | 58 +++++++++++++++++++++++++------------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 17444e42..1d36ea20 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ stages: # - test # - download - build - - deploy +# - deploy #test: # stage: test @@ -11,20 +11,20 @@ stages: # tags: # - xcode_12_2 -download_artifacts: - stage: download - script: - - ./Scripts/download_dependencies.sh - only: - - branches - - feature/script_to_upload - tags: - - bash_shell - environment: - name: oneartifactory - url: https://oneartifactoryprod.verizon.com/artifactory - variables: - ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory +#download_artifacts: +# stage: download +# script: +# - ./Scripts/download_dependencies.sh +# only: +# - branches +# - feature/script_to_upload +# tags: +# - bash_shell +# environment: +# name: oneartifactory +# url: https://oneartifactoryprod.verizon.com/artifactory +# variables: +# ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory build_project: stage: build @@ -36,20 +36,20 @@ build_project: tags: - xcode_12_2 -deploy_snapshot: - stage: deploy - script: - - cd Scripts && ./upload_core_ui_frameworks.sh - only: - - branches - - develop - tags: - - bash_shell - environment: - name: oneartifactory - url: https://oneartifactoryprod.verizon.com/artifactory - variables: - ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory +#deploy_snapshot: +# stage: deploy +# script: +# - cd Scripts && ./upload_core_ui_frameworks.sh +# only: +# - branches +# - develop +# tags: +# - bash_shell +# environment: +# name: oneartifactory +# url: https://oneartifactoryprod.verizon.com/artifactory +# variables: +# ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory #promote_snapshot: # stage: go live From f4935da4769ce82f736d8897c272c6b0240e2a50 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 13:47:05 -0400 Subject: [PATCH 35/47] build and deploy --- MVMCoreUI.xcodeproj/project.pbxproj | 66 ----------------------------- 1 file changed, 66 deletions(-) diff --git a/MVMCoreUI.xcodeproj/project.pbxproj b/MVMCoreUI.xcodeproj/project.pbxproj index 9785a981..c9833c3f 100644 --- a/MVMCoreUI.xcodeproj/project.pbxproj +++ b/MVMCoreUI.xcodeproj/project.pbxproj @@ -6,20 +6,6 @@ objectVersion = 48; objects = { -/* Begin PBXAggregateTarget section */ - D23F60FA268CBB5E007914AB /* MVMCoreUIAggregate */ = { - isa = PBXAggregateTarget; - buildConfigurationList = D23F60FD268CBB5E007914AB /* Build configuration list for PBXAggregateTarget "MVMCoreUIAggregate" */; - buildPhases = ( - D23F6100268CBB71007914AB /* ShellScript */, - ); - dependencies = ( - ); - name = MVMCoreUIAggregate; - productName = MVMCoreUIAggregate; - }; -/* End PBXAggregateTarget section */ - /* Begin PBXBuildFile section */ 01004F3022721C3800991ECC /* RadioButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01004F2F22721C3800991ECC /* RadioButton.swift */; }; 0103B84E23D7E33A009C315C /* HeadlineBodyToggleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0103B84D23D7E33A009C315C /* HeadlineBodyToggleModel.swift */; }; @@ -2480,10 +2466,6 @@ LastUpgradeCheck = 1010; ORGANIZATIONNAME = "Verizon Wireless"; TargetAttributes = { - D23F60FA268CBB5E007914AB = { - CreatedOnToolsVersion = 12.4; - ProvisioningStyle = Automatic; - }; D29DF0CB21E404D4003B2FB9 = { CreatedOnToolsVersion = 10.1; LastSwiftMigration = 1010; @@ -2506,7 +2488,6 @@ projectRoot = ""; targets = ( D29DF0CB21E404D4003B2FB9 /* MVMCoreUI */, - D23F60FA268CBB5E007914AB /* MVMCoreUIAggregate */, ); }; /* End PBXProject section */ @@ -2529,26 +2510,6 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - D23F6100268CBB71007914AB /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930/xcodebuild-7-3-cant-enable-bitcode\n\n# define output folder environment variable\nC_PROJECT_NAME=\"MVMCoreUI\"\nPHONE_CONFIGURATION=\"Release\"\nSIMULATOR_CONFIGURATION=\"Debug\"\n\nUNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal\n\n# Step 1. Build Device and Simulator versions\nxcodebuild -scheme \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath \"${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}\" archive SKIP_INSTALL=false\n\nxcodebuild -target \"${C_PROJECT_NAME}\" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator -arch x86_64 BUILD_DIR=\"${BUILD_DIR}\"\n\nmkdir -p \"${UNIVERSAL_OUTPUTFOLDER}\"\n\nrm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework\ncp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/\"${C_PROJECT_NAME}\".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER}\n\n# Step 2. Create universal binary file using lipo\n\nlipo -create -output \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}\" \"${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\" \"${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\"\n\nmv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}\n"; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ D29DF0C821E404D4003B2FB9 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -3077,24 +3038,6 @@ /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ - D23F60FB268CBB5E007914AB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = FCMA4QKS77; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - D23F60FC268CBB5E007914AB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - DEVELOPMENT_TEAM = FCMA4QKS77; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; D29DF0D221E404D4003B2FB9 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { @@ -3274,15 +3217,6 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - D23F60FD268CBB5E007914AB /* Build configuration list for PBXAggregateTarget "MVMCoreUIAggregate" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - D23F60FB268CBB5E007914AB /* Debug */, - D23F60FC268CBB5E007914AB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; D29DF0C621E404D4003B2FB9 /* Build configuration list for PBXProject "MVMCoreUI" */ = { isa = XCConfigurationList; buildConfigurations = ( From bb72b6ecc7c8495ec494500db2cc1e9399d324d6 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 13:48:57 -0400 Subject: [PATCH 36/47] build and deploy --- .gitlab-ci.yml | 30 +++++++++++++++--------------- Scripts/build_aggregate.sh | 2 -- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d36ea20..7735fb50 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ stages: # - test -# - download + - download - build # - deploy @@ -11,20 +11,20 @@ stages: # tags: # - xcode_12_2 -#download_artifacts: -# stage: download -# script: -# - ./Scripts/download_dependencies.sh -# only: -# - branches -# - feature/script_to_upload -# tags: -# - bash_shell -# environment: -# name: oneartifactory -# url: https://oneartifactoryprod.verizon.com/artifactory -# variables: -# ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory +download_artifacts: + stage: download + script: + - ./Scripts/download_dependencies.sh + only: + - branches + - feature/script_to_upload + tags: + - bash_shell + environment: + name: oneartifactory + url: https://oneartifactoryprod.verizon.com/artifactory + variables: + ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory build_project: stage: build diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index f73cde7d..f9ea8d63 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -14,8 +14,6 @@ UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions #xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true -#copy the framework into the build directory where it is looking for it. -#ditto "$FRAMEWORKS_DIR/MVMCore.framework" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/MVMCore.framework xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true #mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" From 48ea1840b15c308c75cf060fca46f285bbc02263 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 14:01:35 -0400 Subject: [PATCH 37/47] build and deploy --- Scripts/build_aggregate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index f9ea8d63..01592712 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -14,7 +14,7 @@ UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions #xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=true -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true #mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" # From f4a7f7392be065eee998659f3467f2cb2b6de7b7 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 14:06:04 -0400 Subject: [PATCH 38/47] build and deploy --- Scripts/build_aggregate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 01592712..f9ea8d63 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -14,7 +14,7 @@ UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions #xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=true -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true #mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" # From 125a0b5fd9a0f706968ac443753657770676bc98 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 14:50:44 -0400 Subject: [PATCH 39/47] build and deploy --- Scripts/build_aggregate.sh | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index f9ea8d63..30e20c5f 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -4,25 +4,28 @@ unset TOOLCHAINS #Xcode 7.3 BUG FIX http://stackoverflow.com/questions/36184930 C_PROJECT_NAME="MVMCoreUI" PHONE_CONFIGURATION="Release" SIMULATOR_CONFIGURATION="Debug" - BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) +SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework" FRAMEWORKS_DIR=$BUILD_DIR/Frameworks -echo $FRAMEWORKS_DIR - UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions -#xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true +xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true -#mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" -# -#rm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework -#cp -R ${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/"${C_PROJECT_NAME}".xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework ${UNIVERSAL_OUTPUTFOLDER} -# -## Step 2. Create universal binary file using lipo -# -#lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}" "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" "${BUILD_DIR}/${SIMULATOR_CONFIGURATION}-iphonesimulator/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" -# -#mv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME} +mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" + +rm -rf ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework +cp -R "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}.xcarchive/Products/Library/Frameworks/${C_PROJECT_NAME}.framework" ${UNIVERSAL_OUTPUTFOLDER} + +# Step 2. Create universal binary file using lipo + +lipo -create -output "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}" "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME}" "${SIMULATOR_LIBRARY_PATH}/${C_PROJECT_NAME}" + +mv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/${C_PROJECT_NAME} + +# For Swift framework, Swiftmodule needs to be copied in the universal framework +if [ -d "${SIMULATOR_LIBRARY_PATH}/Modules/${C_PROJECT_NAME}.swiftmodule/" ]; then +cp -a "${SIMULATOR_LIBRARY_PATH}/Modules/${C_PROJECT_NAME}.swiftmodule/" "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/Modules/${C_PROJECT_NAME}.swiftmodule/" +fi From 5e7de1baf017f797ede8e8c82613e0cf62655ce4 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 15:00:20 -0400 Subject: [PATCH 40/47] build and deploy --- Scripts/build_aggregate.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index 30e20c5f..c0099cce 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -10,9 +10,9 @@ FRAMEWORKS_DIR=$BUILD_DIR/Frameworks UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions -xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true +#xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true -xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true +xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator BUILD_DIR=$BUILD_DIR FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true mkdir -p "${UNIVERSAL_OUTPUTFOLDER}" From db592425c7d0880e6d02f8410393b29fffb45825 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 15:05:10 -0400 Subject: [PATCH 41/47] build and deploy --- .gitlab-ci.yml | 30 +++++++++++++++--------------- Scripts/build_aggregate.sh | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7735fb50..006d149e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ stages: # - test - download - build -# - deploy + - deploy #test: # stage: test @@ -36,20 +36,20 @@ build_project: tags: - xcode_12_2 -#deploy_snapshot: -# stage: deploy -# script: -# - cd Scripts && ./upload_core_ui_frameworks.sh -# only: -# - branches -# - develop -# tags: -# - bash_shell -# environment: -# name: oneartifactory -# url: https://oneartifactoryprod.verizon.com/artifactory -# variables: -# ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory +deploy_snapshot: + stage: deploy + script: + - cd Scripts && ./upload_core_ui_frameworks.sh + only: + - branches + - develop + tags: + - bash_shell + environment: + name: oneartifactory + url: https://oneartifactoryprod.verizon.com/artifactory + variables: + ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory #promote_snapshot: # stage: go live diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index c0099cce..d3049bff 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -10,7 +10,7 @@ FRAMEWORKS_DIR=$BUILD_DIR/Frameworks UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/universal # Step 1. Build Device and Simulator versions -#xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true +xcodebuild -scheme "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${PHONE_CONFIGURATION} -sdk iphoneos -archivePath "${BUILD_DIR}/${PHONE_CONFIGURATION}-iphoneos/${C_PROJECT_NAME}" archive SKIP_INSTALL=false FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true xcodebuild -target "${C_PROJECT_NAME}" ONLY_ACTIVE_ARCH=NO -configuration ${SIMULATOR_CONFIGURATION} -sdk iphonesimulator BUILD_DIR=$BUILD_DIR FRAMEWORK_SEARCH_PATHS=$FRAMEWORKS_DIR ALWAYS_SEARCH_USER_PATHS=true ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES=true From f51511bd1375e374b7e74e0c4e5ae9465c1e8881 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 15:13:24 -0400 Subject: [PATCH 42/47] build and deploy --- Scripts/download_framework.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index a9660d7f..7cc48bc2 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -47,7 +47,7 @@ fi #get local and remote checksums for comparison echo -e "Getting checksums..." echo -e "URL: ${URL}/api/storage/${REMOTEPATH}" -JSON=$(curl --header "X-JFrog-Art-Api: ${APITOKEN}" -X GET "${URL}/api/storage/${REMOTEPATH}") +JSON=$(curl --header "X-JFrog-Art-Api: ${ARTIFACTORY_APIKEY}" -X GET "${URL}/api/storage/${REMOTEPATH}") CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]') if [[ -z "$CHECKSUM" ]]; then exit_with_error "No Checksum found in json: ${JSON}" @@ -65,7 +65,7 @@ echo "Local checksum ${OLDCHECKSUM}" if [ ! -e "${LOCALPATH}" ] || [ -z "$OLDCHECKSUM" ] || [ "$CHECKSUM" != "$OLDCHECKSUM" ]; then echo "Downloading..." echo -e "URL: ${URL}/${REMOTEPATH}" -curl --header "X-JFrog-Art-Api: ${APITOKEN}" -f -X GET "$URL/$REMOTEPATH" --output "${NEWFILEPATH}" +curl --header "X-JFrog-Art-Api: ${ARTIFACTORY_APIKEY}" -f -X GET "$URL/$REMOTEPATH" --output "${NEWFILEPATH}" if [ $? -eq 0 ] && [ -e "${NEWFILEPATH}" ]; then echo "Finished Downloading, begin unzip" unzip -q -o "${NEWFILEPATH}" -d "${LOCALDIR}" From 3ddaf3907df3ffd7c8aacdbeca1647dcb4a56502 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Thu, 1 Jul 2021 15:22:48 -0400 Subject: [PATCH 43/47] build and deploy --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 006d149e..d475e062 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,7 +17,7 @@ download_artifacts: - ./Scripts/download_dependencies.sh only: - branches - - feature/script_to_upload + - develop tags: - bash_shell environment: From f30d689e14851cf3c673fbe41c2c2d5ffcf09226 Mon Sep 17 00:00:00 2001 From: rajampetS Date: Fri, 2 Jul 2021 16:12:18 +0530 Subject: [PATCH 44/47] Registering ImageButton in CoreUi --- MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift b/MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift index f45d3aac..d4eb516e 100644 --- a/MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift +++ b/MVMCoreUI/OtherHandlers/CoreUIModelMapping.swift @@ -86,6 +86,7 @@ open class CoreUIModelMapping: ModelMapping { ModelRegistry.register(handler: HeadlineBodyButton.self, for: HeadlineBodyButtonModel.self) ModelRegistry.register(handler: BGImageHeadlineBodyButton.self, for: BGImageHeadlineBodyButtonModel.self) ModelRegistry.register(handler: ThreeHeadlineBodyLink.self, for: ThreeHeadlineBodyLinkModel.self) + ModelRegistry.register(handler: ImageButton.self, for: ImageButtonModel.self) // MARK:- Left Right Molecules ModelRegistry.register(handler: CornerLabels.self, for: CornerLabelsModel.self) From d65a4b905a3bb08cf185ef3558d9e67ab9c02729 Mon Sep 17 00:00:00 2001 From: "Pfeil, Scott Robert" Date: Fri, 2 Jul 2021 09:25:10 -0400 Subject: [PATCH 45/47] spacing --- Scripts/build_aggregate.sh | 2 +- Scripts/download_dependencies.sh | 2 +- Scripts/download_framework.sh | 52 ++++++++++++++++---------------- Scripts/upload_framework.sh | 23 +++++++------- 4 files changed, 39 insertions(+), 40 deletions(-) diff --git a/Scripts/build_aggregate.sh b/Scripts/build_aggregate.sh index d3049bff..514d0075 100755 --- a/Scripts/build_aggregate.sh +++ b/Scripts/build_aggregate.sh @@ -27,5 +27,5 @@ mv ${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME} ${UNIVERSAL_OUTPUTFOLDER}/${C_PRO # For Swift framework, Swiftmodule needs to be copied in the universal framework if [ -d "${SIMULATOR_LIBRARY_PATH}/Modules/${C_PROJECT_NAME}.swiftmodule/" ]; then -cp -a "${SIMULATOR_LIBRARY_PATH}/Modules/${C_PROJECT_NAME}.swiftmodule/" "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/Modules/${C_PROJECT_NAME}.swiftmodule/" + cp -a "${SIMULATOR_LIBRARY_PATH}/Modules/${C_PROJECT_NAME}.swiftmodule/" "${UNIVERSAL_OUTPUTFOLDER}/${C_PROJECT_NAME}.framework/Modules/${C_PROJECT_NAME}.swiftmodule/" fi diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 66742216..f03a25e8 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -15,7 +15,7 @@ BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep FRAMEWORKS_DIR=$BUILD_DIR/Frameworks if [ ! -d $FRAMEWORKS_DIR ]; then -mkdir $FRAMEWORKS_DIR + mkdir $FRAMEWORKS_DIR fi ./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/MVMCore.framework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/MVMCore/1.0/MVMCore-1.0-Debug-SNAPSHOT.zip diff --git a/Scripts/download_framework.sh b/Scripts/download_framework.sh index 7cc48bc2..9e9e2bb5 100755 --- a/Scripts/download_framework.sh +++ b/Scripts/download_framework.sh @@ -25,7 +25,7 @@ fi exit_with_error () { echo "Error: $1" if [ -f "${NEWFILEPATH}" ]; then -rm -rf "${NEWFILEPATH}" 2 + rm -rf "${NEWFILEPATH}" 2 fi exit 1 } @@ -37,11 +37,11 @@ echo -e "Local Target: ${LOCALPATH}" echo -e "Remote Source: ${REMOTEPATH}" if [ -z "$LOCALPATH" ]; then -exit_with_error "Missing local path argument" + exit_with_error "Missing local path argument" fi if [ -z "$REMOTEPATH" ]; then -exit_with_error "Missing filename path argument" + exit_with_error "Missing filename path argument" fi #get local and remote checksums for comparison @@ -50,37 +50,37 @@ echo -e "URL: ${URL}/api/storage/${REMOTEPATH}" JSON=$(curl --header "X-JFrog-Art-Api: ${ARTIFACTORY_APIKEY}" -X GET "${URL}/api/storage/${REMOTEPATH}") CHECKSUM=$(echo "$JSON" | python -c 'import sys, json; print json.load(sys.stdin)["checksums"]["sha1"]') if [[ -z "$CHECKSUM" ]]; then -exit_with_error "No Checksum found in json: ${JSON}" + exit_with_error "No Checksum found in json: ${JSON}" fi echo "Remote checksum ${CHECKSUM}" if [[ -f "${VERSIONFILE}" ]]; then -OLDCHECKSUM=$(cat "${VERSIONFILE}") + OLDCHECKSUM=$(cat "${VERSIONFILE}") else -OLDCHECKSUM="none" -mkdir -p $(dirname ${VERSIONFILE}) && touch "$VERSIONFILE" + OLDCHECKSUM="none" + mkdir -p $(dirname ${VERSIONFILE}) && touch "$VERSIONFILE" fi echo "Local checksum ${OLDCHECKSUM}" #get new framework if no original framework, no local checksum, or remote checksum is different from local. if [ ! -e "${LOCALPATH}" ] || [ -z "$OLDCHECKSUM" ] || [ "$CHECKSUM" != "$OLDCHECKSUM" ]; then -echo "Downloading..." -echo -e "URL: ${URL}/${REMOTEPATH}" -curl --header "X-JFrog-Art-Api: ${ARTIFACTORY_APIKEY}" -f -X GET "$URL/$REMOTEPATH" --output "${NEWFILEPATH}" -if [ $? -eq 0 ] && [ -e "${NEWFILEPATH}" ]; then -echo "Finished Downloading, begin unzip" -unzip -q -o "${NEWFILEPATH}" -d "${LOCALDIR}" -if [ $? -eq 0 ]; then -echo "Finished unzipping, remove zip" -rm -rf "${NEWFILEPATH}" -echo "Writing new checksum to file" -echo "${CHECKSUM}" > "${VERSIONFILE}" -echo "Successfully downloaded and unzipped archive." + echo "Downloading..." + echo -e "URL: ${URL}/${REMOTEPATH}" + curl --header "X-JFrog-Art-Api: ${ARTIFACTORY_APIKEY}" -f -X GET "$URL/$REMOTEPATH" --output "${NEWFILEPATH}" + if [ $? -eq 0 ] && [ -e "${NEWFILEPATH}" ]; then + echo "Finished Downloading, begin unzip" + unzip -q -o "${NEWFILEPATH}" -d "${LOCALDIR}" + if [ $? -eq 0 ]; then + echo "Finished unzipping, remove zip" + rm -rf "${NEWFILEPATH}" + echo "Writing new checksum to file" + echo "${CHECKSUM}" > "${VERSIONFILE}" + echo "Successfully downloaded and unzipped archive." + else + exit_with_error "Error unzipping" + fi + else + exit_with_error "Failed to download" + fi else -exit_with_error "Error unzipping" -fi -else -exit_with_error "Failed to download" -fi -else -echo "Successful, No New Version" + echo "Successful, No New Version" fi diff --git a/Scripts/upload_framework.sh b/Scripts/upload_framework.sh index 94a6007b..305a6585 100755 --- a/Scripts/upload_framework.sh +++ b/Scripts/upload_framework.sh @@ -59,16 +59,16 @@ zip -r -X "${LOCALBASE}.zip" $LOCALBASE CHECKSUM=$(shasum -a 1 "${LOCALBASE}.zip" | cut -d " " -f 1) echo -e "SHA-1 Checksum: \t${CHECKSUM}" if [ -e ${LOCALBASE}.dSYM ]; then -echo -e "---------\nZipping: \t\t${LOCALBASE}.dSYM.zip" -zip -r -X "${LOCALBASE}.dSYM.zip" $LOCALBASE.dSYM -# Generate its SHA-1 checksum for dsym. -DSYM_CHECKSUM=$(shasum -a 1 "${LOCALBASE}.dSYM.zip" | cut -d " " -f 1) -echo -e "SHA-1 Checksum: \t${DSYM_CHECKSUM}" + echo -e "---------\nZipping: \t\t${LOCALBASE}.dSYM.zip" + zip -r -X "${LOCALBASE}.dSYM.zip" $LOCALBASE.dSYM + # Generate its SHA-1 checksum for dsym. + DSYM_CHECKSUM=$(shasum -a 1 "${LOCALBASE}.dSYM.zip" | cut -d " " -f 1) + echo -e "SHA-1 Checksum: \t${DSYM_CHECKSUM}" fi popd mv ${LOCALPATH}.zip . if [ -e ${LOCALPATH}.dSYM.zip ]; then -mv ${LOCALPATH}.dSYM.zip . + mv ${LOCALPATH}.dSYM.zip . fi # Upload framework to Artifactory. @@ -79,12 +79,11 @@ curl --header "X-JFrog-Art-Api: ${APIKEY}" --header "X-Checksum-Sha1: ${CHECKSUM rm "${LOCALBASE}.zip" if [ -e ${LOCALBASE}.dSYM.zip ]; then -# Upload dsym Artifactory. -echo -e "---------\nUploading to: \t\t${URL}/${REMOTEPATH}.dSYM.zip" -curl --header "X-JFrog-Art-Api: ${APIKEY}" --header "X-Checksum-Sha1: ${DSYM_CHECKSUM}" -X PUT "${URL}/${REMOTEPATH}.dSYM.zip" -T "${LOCALBASE}.dSYM.zip" -# Cleanup dsym. -rm ${LOCALBASE}.dSYM.zip + # Upload dsym Artifactory. + echo -e "---------\nUploading to: \t\t${URL}/${REMOTEPATH}.dSYM.zip" + curl --header "X-JFrog-Art-Api: ${APIKEY}" --header "X-Checksum-Sha1: ${DSYM_CHECKSUM}" -X PUT "${URL}/${REMOTEPATH}.dSYM.zip" -T "${LOCALBASE}.dSYM.zip" + # Cleanup dsym. + rm ${LOCALBASE}.dSYM.zip fi - echo -e "\n\n<<< UPLOAD COMPLETE >>>\n\n" From 47b6115ffdba98fd8b893b6a567b358c8a7a2c8c Mon Sep 17 00:00:00 2001 From: rajampetS Date: Mon, 5 Jul 2021 13:56:53 +0530 Subject: [PATCH 46/47] Generalised delegate method --- MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift index 79a3e6e0..c0f001e7 100644 --- a/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift +++ b/MVMCoreUI/Atomic/Atoms/Selectors/RadioBoxes.swift @@ -9,7 +9,7 @@ import Foundation public protocol RadioBoxSelectionDelegate: class { - func selectedRadioBox(text: String) + func selected(radioBox: RadioBoxModel) } open class RadioBoxes: View { @@ -167,7 +167,7 @@ extension RadioBoxes: UICollectionViewDelegate { _ = FormValidator.validate(delegate: delegateObject?.formHolderDelegate) cell.updateAccessibility() guard let radioBox = boxes?[indexPath.row] else { return } - radioDelegate?.selectedRadioBox(text: radioBox.text) + radioDelegate?.selected(radioBox: radioBox) } open func collectionView(_ collectionView: UICollectionView, didDeselectItemAt indexPath: IndexPath) { From 24481d9345d597b41c15dc38cff35c4300d7395e Mon Sep 17 00:00:00 2001 From: "Suresh, Kamlesh" Date: Wed, 7 Jul 2021 21:34:37 -0400 Subject: [PATCH 47/47] open --- MVMCoreUI/Containers/Views/Container.swift | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/MVMCoreUI/Containers/Views/Container.swift b/MVMCoreUI/Containers/Views/Container.swift index e3512bab..5b2e83eb 100644 --- a/MVMCoreUI/Containers/Views/Container.swift +++ b/MVMCoreUI/Containers/Views/Container.swift @@ -53,31 +53,28 @@ open class Container: View, ContainerProtocol { open func constrainView(_ view: UIView) { containerHelper.constrainView(view) } -} -// MARK: - MVMCoreViewProtocol -public extension Container { - - override func updateView(_ size: CGFloat) { + // MARK: - MVMCoreViewProtocol + open override func updateView(_ size: CGFloat) { super.updateView(size) (view as? MVMCoreViewProtocol)?.updateView(size) containerHelper.updateViewMargins(self, model: containerModel, size: size) } - + /// Will be called only once. - override func setupView() { + open override func setupView() { super.setupView() isAccessibilityElement = false backgroundColor = .clear } - - func addAndContain(_ view: UIView) { + + open func addAndContain(_ view: UIView) { view.translatesAutoresizingMaskIntoConstraints = false addSubview(view) containerHelper.constrainView(view) self.view = view } - + convenience init(andContain view: UIView) { self.init() addAndContain(view)