Rename zed2 -> zed

Co-authored-by: Mikayla <mikayla@zed.dev>
This commit is contained in:
Max Brunsfeld 2024-01-03 10:08:26 -08:00
parent b594e59134
commit 7986ee18cd
237 changed files with 2971 additions and 18447 deletions

View file

@ -27,11 +27,10 @@ Options:
-o Open the resulting DMG or the app itself in local mode.
-f Overwrite the local app bundle if it exists.
-h Display this help and exit.
-2 Build zed 2 instead of zed 1.
"
}
while getopts 'dlfoh2' flag
while getopts 'dlfoh' flag
do
case "${flag}" in
o) open_result=true;;
@ -50,10 +49,6 @@ do
target_dir="debug"
;;
f) overwrite_local_app=true;;
2)
zed_crate="zed2"
binary_name="Zed2"
;;
h)
help_info
exit 0
@ -152,12 +147,7 @@ if [[ -n $MACOS_CERTIFICATE && -n $MACOS_CERTIFICATE_PASSWORD && -n $APPLE_NOTAR
# sequence of codesign commands modeled after this example: https://developer.apple.com/forums/thread/701514
/usr/bin/codesign --deep --force --timestamp --sign "Zed Industries, Inc." "${app_path}/Contents/Frameworks/WebRTC.framework" -v
# todo!(restore cli to zed2)
if [[ "$zed_crate" == "zed" ]]; then
/usr/bin/codesign --deep --force --timestamp --options runtime --sign "Zed Industries, Inc." "${app_path}/Contents/MacOS/cli" -v
fi
/usr/bin/codesign --deep --force --timestamp --options runtime --sign "Zed Industries, Inc." "${app_path}/Contents/MacOS/cli" -v
/usr/bin/codesign --deep --force --timestamp --options runtime --entitlements crates/${zed_crate}/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}/Contents/MacOS/${zed_crate}" -v
/usr/bin/codesign --force --timestamp --options runtime --entitlements crates/${zed_crate}/resources/zed.entitlements --sign "Zed Industries, Inc." "${app_path}" -v

View file

@ -11,7 +11,7 @@ graph_file=target/crate-graph.html
cargo depgraph \
--workspace-only \
--offline \
--root=zed2,cli,collab2 \
--root=zed,cli,collab2 \
--dedup-transitive-deps \
| dot -Tsvg > $graph_file

View file

@ -1,27 +0,0 @@
import os
from pathlib import Path
THIS_SCRIPT_PATH: Path = Path(__file__)
CRATES_DIR: Path = THIS_SCRIPT_PATH.parent.parent / "crates"
zed_1_crate_count: int = 0
zed_2_crate_count: int = 0
for child in os.listdir(CRATES_DIR):
child_path: str = os.path.join(CRATES_DIR, child)
if not os.path.isdir(child_path):
continue
if child.endswith("2"):
zed_2_crate_count += 1
else:
zed_1_crate_count += 1
print(f"crates ported: {zed_2_crate_count}")
print(f"crates in total: {zed_1_crate_count}")
percent_complete: float = (zed_2_crate_count / zed_1_crate_count) * 100
percent_complete_rounded: float = round(percent_complete, 2)
print(f"progress: {percent_complete_rounded}%")

View file

@ -4,7 +4,6 @@ const { spawn, execFileSync } = require("child_process");
const RESOLUTION_REGEX = /(\d+) x (\d+)/;
const DIGIT_FLAG_REGEX = /^--?(\d+)$/;
const ZED_2_MODE = "--zed2";
const RELEASE_MODE = "--release";
const args = process.argv.slice(2);
@ -16,7 +15,6 @@ if (digitMatch) {
instanceCount = parseInt(digitMatch[1]);
args.shift();
}
const isZed2 = args.some((arg) => arg === ZED_2_MODE);
const isReleaseMode = args.some((arg) => arg === RELEASE_MODE);
if (instanceCount > 4) {
throw new Error("Cannot spawn more than 4 instances");
@ -71,17 +69,11 @@ const buildArgs = (() => {
buildArgs.push("--release");
}
if (isZed2) {
buildArgs.push("-p", "zed2");
}
return buildArgs;
})();
const zedBinary = (() => {
const target = isReleaseMode ? "release" : "debug";
const binary = isZed2 ? "Zed2" : "Zed";
return `target/${target}/${binary}`;
return `target/${target}/Zed`;
})();
execFileSync("cargo", buildArgs, { stdio: "inherit" });