Remove Ruby automation logic

This commit is contained in:
Pedro Piñera 2018-06-24 15:23:30 +02:00
parent 6f96181901
commit 5872e3f42b
6 changed files with 0 additions and 290 deletions

View File

@ -1 +0,0 @@
GH_TOKEN=xxxx

View File

@ -1,4 +0,0 @@
# frozen_string_literal: true
# Swift lint
swiftlint.lint_files

16
Gemfile
View File

@ -1,16 +0,0 @@
# frozen_string_literal: true
source 'https://rubygems.org'
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
gem 'byebug'
gem 'danger'
gem 'danger-swiftlint'
gem 'dotenv'
gem 'git'
gem 'jazzy'
gem 'octokit'
gem 'rake'
gem 'rubocop'
gem 'semantic'

View File

@ -1,177 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.6)
activesupport (4.2.10)
i18n (~> 0.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
ast (2.4.0)
atomos (0.1.2)
byebug (10.0.1)
claide (1.0.2)
claide-plugins (0.9.2)
cork
nap
open4 (~> 1.3)
cocoapods (1.4.0)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.4.0)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.3.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.6.4)
nap (~> 1.0)
ruby-macho (~> 1.1)
xcodeproj (>= 1.5.4, < 2.0)
cocoapods-core (1.4.0)
activesupport (>= 4.0.2, < 6)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.2)
cocoapods-downloader (1.1.3)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.3.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
colored2 (3.1.2)
concurrent-ruby (1.0.5)
cork (0.3.0)
colored2 (~> 3.1)
danger (5.5.12)
claide (~> 1.0)
claide-plugins (>= 0.9.2)
colored2 (~> 3.1)
cork (~> 0.1)
faraday (~> 0.9)
faraday-http-cache (~> 1.0)
git (~> 1)
kramdown (~> 1.5)
no_proxy_fix
octokit (~> 4.7)
terminal-table (~> 1)
danger-swiftlint (0.16.0)
danger
rake (> 10)
thor (~> 0.19)
dotenv (2.2.1)
escape (0.0.4)
faraday (0.14.0)
multipart-post (>= 1.2, < 3)
faraday-http-cache (1.3.1)
faraday (~> 0.8)
ffi (1.9.23)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
git (1.3.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jazzy (0.9.1)
cocoapods (~> 1.0)
mustache (~> 0.99)
open4
redcarpet (~> 3.2)
rouge (>= 2.0.6, < 4.0)
sass (~> 3.4)
sqlite3 (~> 1.3)
xcinvoke (~> 0.3.0)
kramdown (1.16.2)
liferaft (0.0.6)
mini_portile2 (2.3.0)
minitest (5.11.3)
molinillo (0.6.4)
multipart-post (2.0.0)
mustache (0.99.8)
nanaimo (0.2.3)
nap (1.1.0)
netrc (0.11.0)
no_proxy_fix (0.1.2)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
octokit (4.8.0)
sawyer (~> 0.8.0, >= 0.5.3)
open4 (1.3.4)
parallel (1.12.1)
parser (2.5.0.5)
ast (~> 2.4.0)
powerpack (0.1.1)
public_suffix (3.0.2)
rainbow (3.0.0)
rake (12.3.0)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
redcarpet (3.4.0)
rouge (3.1.1)
rubocop (0.54.0)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
ruby-macho (1.1.0)
ruby-progressbar (1.9.0)
sass (3.5.5)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
semantic (1.6.1)
sparklecast (0.0.1)
nokogiri
sqlite3 (1.3.13)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thor (0.20.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.3.0)
xcinvoke (0.3.0)
liferaft (~> 0.0.6)
xcodeproj (1.5.6)
CFPropertyList (~> 2.3.3)
atomos (~> 0.1.2)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.3)
PLATFORMS
ruby
DEPENDENCIES
byebug
danger
danger-swiftlint
dotenv
git
jazzy
octokit
rake
rubocop
semantic
sparklecast
BUNDLED WITH
1.16.1

View File

@ -1,10 +0,0 @@
# Release
This document describes all the steps that you need to go through to release a new version of the app:
> Note: Only an authorized person with access to the private keys can release new version of the app. All the necessary keys are encrypted in the directory `/keys`.
1. Being on `master`, pull the latest changes.
2. Create a new branch with the name `version/x.y.z` where `x.y.z` is the new version.
3. Update the [CHANGELOG.md](CHANGELOG.md) file adding a new section at the top for the next version *(if the version that is about to be released includes breaking changes, the new version should be a major version)*. Commit the changes in the file.
4. Run the command `bundle exec rake release`. If it succeeds, it'll create a new release on GitHub containing the changelog and a zip with the app binary.
5. Rebase this branch into `master` and push the changes to the GitHub repository.

View File

@ -1,82 +0,0 @@
# frozen_string_literal: true
require 'semantic'
require 'octokit'
require 'date'
require 'dotenv/load'
require 'open3'
RELEASES_REPOSITORY = 'xcode-project-manager/xpm'
GITHUB_TOKEN = ENV['GH_TOKEN']
CHANGELOG_PATH = 'CHANGELOG.md'
PROJECT_PATH = "xpm.xcodeproj"
def execute(*command)
system(*command) || abort
end
def changelog(version)
version = Semantic::Version.new(version)
version_regex = /##\s+#{version.major}\.#{version.minor}\.#{version.patch}/
any_version_regex = /##\s+\d+\.\d+\.\d+/
output = ''
reading = false
File.readlines(CHANGELOG_PATH).each do |line|
if line =~ version_regex && !reading
reading = true
next
end
if line =~ any_version_regex && reading
reading = false
break
end
output = "#{output}#{line}" if reading
end
output
end
# def release
# branch = `git rev-parse --abbrev-ref HEAD`.strip
# unless branch.include?('version/')
# abort('Branch name should be version/x.x.x where x.x.x is the version')
# end
# # Bump version
# new_bundle_version, new_version = bump_version
# # Archiving
# archive_and_export
# execute("cd #{BUILD_PATH} && ditto -c -k --sequesterRsrc --keepParent #{APP_NAME}.app #{APP_NAME}.zip")
# # Commiting changes
# execute('git add .')
# execute("git commit -m 'Version #{new_version}'")
# execute("git tag #{new_version}")
# execute("git push --set-upstream origin version/#{new_version}")
# # Release
# client = Octokit::Client.new(access_token: GITHUB_TOKEN)
# changelog = changelog(new_version)
# release = client.create_release(REPOSITORY, new_version, name: new_version, body: changelog, draft: false)
# client.upload_asset(release.url, "#{BUILD_PATH}/#{APP_NAME}.zip",
# content_type: 'application/zip')
# end
def generate_project
execute('swift package generate-xcodeproj')
end
desc 'Formats the swift code'
task :format do
execute('swiftformat .')
end
desc 'Builds the app'
task :build do
execute("swift build")
end
desc 'Runs the unit tests'
task :test do
execute("swift test")
end