Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: Canary release support + SPM automated releases #434

Merged
merged 18 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions .autorc
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
"owner": "player-ui",
"repo": "player",
"plugins": [
[
"upload-assets",
{
"assets": [
"./bazel-bin/PlayerUI_Pod.zip"
]
}
],
[
"version-file",
{
Expand All @@ -30,7 +22,6 @@
"labels": "release"
}
],
"./scripts/after-shipit-pod-push.js",
"./scripts/delete-old-prerelease.js"
]
}
8 changes: 7 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ commands:
- gem-v1-{{ arch }}-{{ .Branch }}-{{ checksum "Gemfile.lock" }}
- gem-v1-{{ arch }}-main-{{ checksum "Gemfile.lock" }}

- run: mkdir ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- add_ssh_keys:
fingerprints:
- "SHA256:hUAWVYdfSW5ml6ufbfyEHUcuPwUJ88xVhsZc21b2lA8"

- run: mkdir -p ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config
- run: echo "//registry.npmjs.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: git config --global user.name "Intuit Service"
- run: git config --global user.email "opensource-svc@intuit.com"
- run: |
echo -e $GPG_KEY | gpg --import --batch
echo -e "pinentry-mode loopback\npassphrase $DEPLOY_MAVEN_GPG_PASSPHRASE" > ~/.gnupg/gpg.conf
Expand Down
21 changes: 20 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_player//ios:defs.bzl", "assemble_pod")
load("@rules_player//ios:defs.bzl", "assemble_pod", "ios_publish")
load("@rules_player//internal:defs.bzl", "stamp")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("@aspect_rules_js//js:defs.bzl", "js_library")
Expand Down Expand Up @@ -190,6 +190,25 @@ assemble_pod(
podspec = ":PlayerUI_Podspec",
)

ios_publish(
name = "ios_publish",
zip = ":PlayerUI_Pod",
# SPM Release Repo
repository = "git@github.com:player-ui/playerui-swift-package.git",
# CocoaPods
podspec = ":PlayerUI_Podspec",
executable = "bundle exec pod",
globalFlags = [
# because jenkins runs as root
"--allow-root",
],
pushFlags = [
# skip tests because it never runs them right
# and they're run as part of the build pipeline anyway
"--skip-tests",
],
)

# # Push podspec to specs repo
# # tag must exist in github first
# pod_push(
Expand Down
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ bazel_dep(name = "rules_player")

archive_override(
module_name = "rules_player",
strip_prefix = "rules_player-1.0.0",
urls = ["https://github.com/player-ui/rules_player/archive/refs/tags/v1.0.0.tar.gz"],
integrity = "sha256-08MFpLzTnmwrIZhvE1cBL21cSqmjXzD6SH2HhTf8hR4="
strip_prefix = "rules_player-1.0.1",
urls = ["https://github.com/player-ui/rules_player/archive/refs/tags/v1.0.1.tar.gz"],
integrity = "sha256-zIbxx1Bh/X4E8OwbPJz1nY9mOd2uAgmTZyf1Hs2mq+U="
)
#local_path_override(module_name = "rules_player", path = "../rules_player")

Expand Down
6 changes: 3 additions & 3 deletions PlayerUI.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ and display it as a SwiftUI view comprised of registered assets.
s.homepage = 'https://github.com/player-ui/player'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'hborawski' => 'harris_borawski@intuit.com' }
s.source = { :http => "https://github.com/player-ui/player/releases/download/#{s.version.to_s}/PlayerUI_Pod.zip" }
s.source = { :git => "https://github.com/player-ui/playerui-swift-package.git", :tag => s.version.to_s }

s.ios.deployment_target = '14.0'

Expand Down Expand Up @@ -96,7 +96,7 @@ and display it as a SwiftUI view comprised of registered assets.
subspec.source_files = "plugins/#{path}/ios/Sources/**/*"
if resources == TRUE
subspec.resource_bundles = {
name => ["plugins/#{path}/ios/Resources/**/*.js"]
"PlayerUI_#{name}" => ["plugins/#{path}/ios/Resources/**/*.js"]
}
end
end
Expand All @@ -112,7 +112,7 @@ and display it as a SwiftUI view comprised of registered assets.
subspec.source_files = "plugins/#{path}/swiftui/Sources/**/*"
if resources == TRUE
subspec.resource_bundles = {
name => ["plugins/#{path}/swiftui/Resources/**/*.js"]
"PlayerUI_#{name}" => ["plugins/#{path}/swiftui/Resources/**/*.js"]
}
end
end
Expand Down
59 changes: 0 additions & 59 deletions scripts/after-shipit-pod-push.js

This file was deleted.

3 changes: 1 addition & 2 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ done
# Rebuild to stamp the release podspec
bazel build --config=release //:PlayerUI_Podspec //:PlayerUI_Pod

# VScode extension publishing
bazel run --config=release //language/vscode-player-syntax:vscode-plugin.publish
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this VScode extension publishing be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah this target is gone now, so it was just throwing errors

functionality was moved to the tools repo

bazel run --config=release //:ios_publish

# Maven Central publishing
bazel run @rules_player//distribution:staged-maven-deploy -- "$RELEASE_TYPE" --package-group=com.intuit.playerui --legacy --client-timeout=600 --connect-timeout=600
Expand Down