Skip to content

Commit 89bc5f5

Browse files
committed
v0.6.0
1 parent c1a8ca8 commit 89bc5f5

File tree

9 files changed

+29
-35
lines changed

9 files changed

+29
-35
lines changed

crates/build/build_pkgs.rs

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn run(args: Args) {
2525
let alpine_public_key = cmd!("pass", "tangram/keys/alpine.public.rsa")
2626
.read()
2727
.unwrap();
28-
let alpine_private_key = cmd!("pass", "tangram/keys/alpine.public.rsa")
28+
let alpine_private_key = cmd!("pass", "tangram/keys/alpine.private.rsa")
2929
.read()
3030
.unwrap();
3131
let deb_public_key = cmd!("pass", "tangram/keys/deb.public.gpg").read().unwrap();
@@ -89,7 +89,7 @@ fn alpine(
8989
alpine_public_key_path: &Path,
9090
alpine_private_key_path: &Path,
9191
) -> Result<()> {
92-
for arch in [Arch::X8664, Arch::AArch64] {
92+
for target in [Target::X8664UnknownLinuxMusl] {
9393
let repo_path = pkgs_path.join("stable").join("alpine");
9494
std::fs::create_dir_all(&repo_path).unwrap();
9595
std::fs::copy(alpine_public_key_path, repo_path.join("tangram.rsa")).unwrap();
@@ -106,39 +106,36 @@ fn alpine(
106106
arch={arch}
107107
license="MIT"
108108
source="tangram"
109-
\n
109+
options="!strip"
110+
110111
check() {{
111112
:
112113
}}
113-
\n
114+
114115
package() {{
115116
install -D -m 755 "$srcdir"/tangram "$pkgdir"/usr/bin/tangram
116117
}}
117118
"#,
118119
version = args.version,
119-
arch = match arch {
120+
arch = match target.arch() {
120121
Arch::X8664 => "x86_64",
121122
Arch::AArch64 => "aarch64",
122123
Arch::Wasm32 => unreachable!(),
123124
},
124125
);
125126
std::fs::write(&apkbuild_path, &apkbuild).unwrap();
126127
let tangram_cli_dst_path = repo_path.join("tangram");
127-
let target = match arch {
128-
Arch::X8664 => Target::X8664UnknownLinuxGnu,
129-
Arch::AArch64 => Target::AArch64UnknownLinuxGnu,
130-
Arch::Wasm32 => unreachable!(),
131-
};
132128
let tangram_cli_path = dist_path
133129
.join(target.as_str())
134130
.join(TargetFileNames::for_target(target).tangram_cli_file_name);
135131
std::fs::copy(tangram_cli_path, &tangram_cli_dst_path).unwrap();
136132
let script = r#"
133+
set -e
137134
apk add build-base abuild
138-
echo "PACKAGER_PUBKEY=/tangram.public.rsa" >> /etc/abuild.conf
139-
echo "PACKAGER_PRIVKEY=/tangram.private.rsa" >> /etc/abuild.conf
135+
echo "PACKAGER_PUBKEY=/alpine.public.rsa" >> /etc/abuild.conf
136+
echo "PACKAGER_PRIVKEY=/alpine.private.rsa" >> /etc/abuild.conf
140137
abuild -F checksum
141-
abuild -F -P $PWD
138+
abuild -f -F -P $PWD
142139
rm -rf src pkg
143140
"#;
144141
cmd!(
@@ -156,13 +153,13 @@ fn alpine(
156153
format!(
157154
"{}:{}",
158155
alpine_public_key_path.canonicalize().unwrap().display(),
159-
"/tangram.public.rsa"
156+
"/alpine.public.rsa"
160157
),
161158
"-v",
162159
format!(
163160
"{}:{}",
164161
alpine_private_key_path.canonicalize().unwrap().display(),
165-
"/tangram.private.rsa"
162+
"/alpine.private.rsa"
166163
),
167164
"-w",
168165
"/tangram",

crates/build/compile.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -465,18 +465,15 @@ fn build_python_windows(target: Target) {
465465

466466
fn build_wasm(target: Target) {
467467
cmd!(
468-
which("cargo").unwrap(),
468+
"cargo",
469469
"build",
470470
"--release",
471471
"--target",
472472
target.as_str(),
473473
"--package",
474474
"tangram_wasm",
475475
)
476-
.env(
477-
"CARGO_TARGET_DIR",
478-
format!("../../target_{}", target.as_str()),
479-
)
476+
.env("CARGO_TARGET_DIR", format!("target_{}", target.as_str()))
480477
.run()
481478
.unwrap();
482479
}

crates/build/prepare_release.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ pub fn run(args: Args) {
103103
// Write the spec file.
104104
let spec = formatdoc!(
105105
r#"
106+
%global __os_install_post %{{nil}}
107+
106108
Name: tangram
107109
Version: {}
108110
Release: 1

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
clang_12
4141
lld_12
4242
];
43-
cargoSha256 = "sha256-M6d0Lc+0NHqskmwM2NTFyOfHkvDfNYyniwM34T0aACI=";
43+
cargoSha256 = "sha256-Gl0iYChLgvG7f3TAuPFClRmLYSjtDq7wHHDCqr8adTQ=";
4444
cargoBuildFlags = [ "--bin" "tangram" ];
4545
CARGO_TARGET_WASM32_UNKNOWN_UNKNOWN_LINKER = "lld";
4646
};

languages/elixir/scripts/release

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ install -D ../../dist/x86_64-unknown-linux-gnu/libtangram_elixir.so priv/x86_64-
33
install -D ../../dist/aarch64-unknown-linux-gnu/libtangram_elixir.so priv/aarch64-unknown-linux-gnu/libtangram_elixir.so
44
install -D ../../dist/x86_64-unknown-linux-musl/libtangram_elixir.so priv/x86_64-unknown-linux-musl/libtangram_elixir.so
55
install -D ../../dist/aarch64-unknown-linux-musl/libtangram_elixir.so priv/aarch64-unknown-linux-musl/libtangram_elixir.so
6-
install -D ../../dist/x86_64-apple-darwin/libtangram_elixir.dylib priv/x86_64-apple-darwin/libtangram_elixir.dylib
7-
install -D ../../dist/aarch64-apple-darwin/libtangram_elixir.dylib priv/aarch64-apple-darwin/libtangram_elixir.dylib
6+
install -D ../../dist/x86_64-apple-darwin/libtangram_elixir.dylib priv/x86_64-apple-darwin/libtangram_elixir.so
7+
install -D ../../dist/aarch64-apple-darwin/libtangram_elixir.dylib priv/aarch64-apple-darwin/libtangram_elixir.so
88
install -D ../../dist/x86_64-pc-windows-msvc/tangram_elixir.dll priv/x86_64-pc-windows-msvc/tangram_elixir.dll
99
mix hex.publish

languages/javascript/scripts/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ wasm-bindgen --target deno --out-dir dist/deno/ $wasm
4747
cp entrypoints/deno.ts dist/deno/mod.ts
4848

4949
# publish npm package
50-
# npm publish --access public
50+
npm publish --access public
5151

5252
# publish js.tangram.xyz
5353
ssh [email protected] mkdir -p /srv/js/

languages/ruby/scripts/release

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
rm -rf lib/tangram/libtangram/
2-
install -D ../../x86_64-unknown-linux-gnu/libtangram.so lib/tangram/libtangram/x86_64-unknown-linux-gnu/libtangram.so
3-
install -D ../../aarch64-unknown-linux-gnu/libtangram.so lib/tangram/libtangram/aarch64-unknown-linux-gnu/libtangram.so
4-
install -D ../../x86_64-unknown-linux-musl/libtangram.so lib/tangram/libtangram/x86_64-unknown-linux-musl/libtangram.so
5-
install -D ../../aarch64-unknown-linux-musl/libtangram.so lib/tangram/libtangram/aarch64-unknown-linux-musl/libtangram.so
6-
install -D ../../x86_64-apple-darwin/libtangram.dylib lib/tangram/libtangram/x86_64-apple-darwin/libtangram.dylib
7-
install -D ../../aarch64-apple-darwin/libtangram.dylib lib/tangram/libtangram/aarch64-apple-darwin/libtangram.dylib
8-
install -D ../../x86_64-pc-windows-msvc/tangram.dll lib/tangram/libtangram/x86_64-pc-windows-msvc/tangram.dll
2+
install -D ../../dist/x86_64-unknown-linux-gnu/libtangram.so lib/tangram/libtangram/x86_64-unknown-linux-gnu/libtangram.so
3+
install -D ../../dist/aarch64-unknown-linux-gnu/libtangram.so lib/tangram/libtangram/aarch64-unknown-linux-gnu/libtangram.so
4+
install -D ../../dist/x86_64-unknown-linux-musl/libtangram.so lib/tangram/libtangram/x86_64-unknown-linux-musl/libtangram.so
5+
install -D ../../dist/aarch64-unknown-linux-musl/libtangram.so lib/tangram/libtangram/aarch64-unknown-linux-musl/libtangram.so
6+
install -D ../../dist/x86_64-apple-darwin/libtangram.dylib lib/tangram/libtangram/x86_64-apple-darwin/libtangram.dylib
7+
install -D ../../dist/aarch64-apple-darwin/libtangram.dylib lib/tangram/libtangram/aarch64-apple-darwin/libtangram.dylib
8+
install -D ../../dist/x86_64-pc-windows-msvc/tangram.dll lib/tangram/libtangram/x86_64-pc-windows-msvc/tangram.dll
99
gem build tangram.gemspec
1010
rm -rf dist
1111
mkdir -p dist

languages/rust/scripts/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
set -e
2-
pushd macro && cargo publish && popd
2+
cargo publish --manifest-path macro/Cargo.toml
33
cargo publish

scripts/release

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
set -e
22
for path in id zip progress_counter kill_chip finite table metrics text features model linear tree core
33
do
4-
pushd crates/$path
5-
cargo publish
6-
popd
4+
cargo publish --manifest-path crates/$path/Cargo.toml
75
sleep 15
86
done

0 commit comments

Comments
 (0)