diff --git a/Brewfile b/Brewfile index 08b76b31..01b75d7c 100644 --- a/Brewfile +++ b/Brewfile @@ -1,4 +1,3 @@ -brew 'carthage' brew 'coreutils' brew 'gnu-sed' brew 'libtool' diff --git a/Cartfile b/Cartfile deleted file mode 100644 index c1070964..00000000 --- a/Cartfile +++ /dev/null @@ -1 +0,0 @@ -github "sindresorhus/github-markdown-css" == 5.0.0 diff --git a/Cartfile.resolved b/Cartfile.resolved deleted file mode 100644 index fc879c89..00000000 --- a/Cartfile.resolved +++ /dev/null @@ -1 +0,0 @@ -github "sindresorhus/github-markdown-css" "v5.0.0" diff --git a/README.md b/README.md index 34bea06f..f7cb49ea 100644 --- a/README.md +++ b/README.md @@ -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/ ``` diff --git a/VimR/VimR.xcodeproj/project.pbxproj b/VimR/VimR.xcodeproj/project.pbxproj index eb64f629..0650ce26 100644 --- a/VimR/VimR.xcodeproj/project.pbxproj +++ b/VimR/VimR.xcodeproj/project.pbxproj @@ -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 */ diff --git a/VimR/VimR/Base.lproj/Credits.rtf b/VimR/VimR/Base.lproj/Credits.rtf index d25d8652..532eec05 100644 --- a/VimR/VimR/Base.lproj/Credits.rtf +++ b/VimR/VimR/Base.lproj/Credits.rtf @@ -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;;} @@ -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}}} \ No newline at end of file +} \ No newline at end of file diff --git a/bin/build_nightly.sh b/bin/build_nightly.sh index d11af455..5486c1af 100755 --- a/bin/build_nightly.sh +++ b/bin/build_nightly.sh @@ -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 () { diff --git a/bin/build_release.sh b/bin/build_release.sh index dc2bd02c..4a6bbaa7 100755 --- a/bin/build_release.sh +++ b/bin/build_release.sh @@ -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 diff --git a/bin/build_vimr.sh b/bin/build_vimr.sh index d158ba60..e4d52dda 100755 --- a/bin/build_vimr.sh +++ b/bin/build_vimr.sh @@ -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() { @@ -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 diff --git a/bin/setup_markdown_css.sh b/bin/setup_markdown_css.sh new file mode 100755 index 00000000..553f7d7f --- /dev/null +++ b/bin/setup_markdown_css.sh @@ -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 +