Skip to content

Commit

Permalink
Remove Carthage
Browse files Browse the repository at this point in the history
  • Loading branch information
qvacua committed Nov 24, 2023
1 parent 4944eb4 commit 969b9b6
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 22 deletions.
1 change: 0 additions & 1 deletion Brewfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
brew 'carthage'
brew 'coreutils'
brew 'gnu-sed'
brew 'libtool'
Expand Down
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

1 change: 0 additions & 1 deletion Cartfile.resolved

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ git submodule update
xcode-select --install # install the Xcode command line tools, if you haven't already
brew bundle

clean=true notarize=false use_carthage_cache=false ./bin/build_vimr.sh
clean=true notarize=false ./bin/build_vimr.sh
# VimR.app will be placed in ./build/Build/Products/Release/
```

Expand Down
2 changes: 1 addition & 1 deletion VimR/VimR.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "cp ${SRCROOT}/../Carthage/Checkouts/github-markdown-css/github-markdown.css ${SRCROOT}/VimR/markdown/\n";
shellScript = "${SRCROOT}/../bin/setup_markdown_css.sh\n";
};
/* End PBXShellScriptBuildPhase section */

Expand Down
8 changes: 2 additions & 6 deletions VimR/VimR/Base.lproj/Credits.rtf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{\rtf1\ansi\ansicpg1252\cocoartf2638
{\rtf1\ansi\ansicpg1252\cocoartf2758
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica;\f1\fswiss\fcharset0 Helvetica-Bold;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
Expand Down Expand Up @@ -120,8 +120,4 @@ By:
\f1\b Nimble
\f0\b0 \
{\field{\*\fldinst{HYPERLINK "https://github.com/Quick/Nimble"}}{\fldrslt https://github.com/Quick/Nimble}}\
\

\f1\b Carthage
\f0\b0 \
{\field{\*\fldinst{HYPERLINK "https://github.com/Carthage/Carthage"}}{\fldrslt https://github.com/Carthage/Carthage}}}
}
1 change: 0 additions & 1 deletion bin/build_nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
set -Eeuo pipefail

readonly notarize=${notarize:?"true or false"}
readonly use_carthage_cache=${use_carthage_cache:?"true or false"}
readonly clean=${clean:?"true or false"}

main () {
Expand Down
2 changes: 1 addition & 1 deletion bin/build_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ build_release() {
fi
popd >/dev/null

clean=true notarize=true use_carthage_cache=false ./bin/build_vimr.sh
clean=true notarize=true ./bin/build_vimr.sh

pushd "${build_folder_path}" >/dev/null
tar cjf "VimR-${marketing_version}.tar.bz2" VimR.app
Expand Down
9 changes: 0 additions & 9 deletions bin/build_vimr.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ set -Eeuo pipefail

readonly strip_symbols=${strip_symbols:-true}
readonly notarize=${notarize:?"true or false"}
readonly use_carthage_cache=${use_carthage_cache:?"true or false"}
readonly clean=${clean:?"true or false"}

prepare_nvimserver() {
Expand All @@ -29,14 +28,6 @@ prepare_nvimserver() {
build_vimr() {
local -r build_path=$1

# Carthage often crashes => do it at the beginning.
echo "### Updating carthage"
if [[ "${use_carthage_cache}" == true ]]; then
carthage update --cache-builds --platform macos
else
carthage update --platform macos
fi

echo "### Xcodebuilding"
rm -rf "${build_path}"
if [[ "${clean}" == true ]]; then
Expand Down
33 changes: 33 additions & 0 deletions bin/setup_markdown_css.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash
set -Eeuo pipefail

readonly version="5.0.0"
readonly url="https://github.com/sindresorhus/github-markdown-css/archive/refs/tags/v${version}.tar.gz"
readonly ref_md5="91db7943196075d6790c76fa184591d0"

main() {
pushd "$(dirname "${BASH_SOURCE[0]}")/.." >/dev/null

local existing_md5; existing_md5="$(md5 -q ./VimR/VimR/markdown/github-markdown.css || echo "no file")"; readonly existing_md5
if [[ "${existing_md5}" == "${ref_md5}" ]]; then
echo "### CSS already exists, exiting"
popd >/dev/null
exit 0
fi

echo "### Downloading CSS and copying"
local temp_dir; temp_dir="$(mktemp -d)"; readonly temp_dir
echo "${temp_dir}"

pushd "${temp_dir}" >/dev/null
curl -s -L "${url}" -o "css.tar.gz"
tar -xf css.tar.gz
popd >/dev/null

cp "${temp_dir}/github-markdown-css-${version}/github-markdown.css" ./VimR/VimR/markdown

popd >/dev/null
}

main

0 comments on commit 969b9b6

Please sign in to comment.