xccache 1.0.0.rc15341775774 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/xccache/core/git.rb +1 -1
- data/lib/xccache/core/system.rb +2 -1
- data/lib/xccache/spm/pkg/proxy_executable.rb +30 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58a60ae32df0e91fde269eb085ee92700365eecd2adb4a6360e9104e3e7091f1
|
4
|
+
data.tar.gz: 28caf0fc84bf730a78ec3204c9b908ea67a2aacc609ec41e25f46686cf8daefa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45e18eafa038e1ad80a6beede33c7b90f942f069aefb32f15236ba215b128f86d982897c0b4fc8edcaba69bd6e5c11007f8d56d5240a7b3b0a02866a5f0b7143
|
7
|
+
data.tar.gz: 55d8655668175dd6e4c8939d144a4360cad88dfd561a8e394b36bf551fb68f1bbab7d22ba835a3e1744b36a3a21ba85ff4977eeff4890b7fd7801e6e3edd5370
|
data/lib/xccache/core/git.rb
CHANGED
data/lib/xccache/core/system.rb
CHANGED
@@ -3,7 +3,8 @@ module XCCache
|
|
3
3
|
class Package
|
4
4
|
class Proxy < Package
|
5
5
|
class Executable
|
6
|
-
|
6
|
+
REPO_URL = "https://github.com/trinhngocthuyen/xccache-proxy".freeze
|
7
|
+
VERSION_OR_SHA = "0.0.1".freeze
|
7
8
|
|
8
9
|
def run(cmd)
|
9
10
|
env = { "FORCE_OUTPUT" => "console", "FORCE_COLOR" => "1" } if Config.instance.ansi?
|
@@ -21,13 +22,35 @@ module XCCache
|
|
21
22
|
[
|
22
23
|
local_bin_path,
|
23
24
|
default_bin_path,
|
24
|
-
].find(&:exist?) ||
|
25
|
+
].find(&:exist?) || download_or_build_from_source
|
26
|
+
end
|
27
|
+
|
28
|
+
def default_use_downloaded?
|
29
|
+
VERSION_OR_SHA.include?(".")
|
30
|
+
end
|
31
|
+
|
32
|
+
def download_or_build_from_source
|
33
|
+
default_use_downloaded? ? download : build_from_source
|
34
|
+
end
|
35
|
+
|
36
|
+
def build_from_source
|
37
|
+
UI.section("Building xccache-proxy binary from source...".magenta) do
|
38
|
+
dir = Dir.prepare("~/.xccache/xccache-proxy", expand: true)
|
39
|
+
git = Git.new(dir)
|
40
|
+
git.init unless git.init?
|
41
|
+
git.remote("add", "origin", REPO_URL) unless git.remote(capture: true)[0].strip == "origin"
|
42
|
+
git.fetch("origin", VERSION_OR_SHA)
|
43
|
+
git.checkout("-f", "FETCH_HEAD", capture: true)
|
44
|
+
|
45
|
+
Dir.chdir(dir) { Sh.run("make build CONFIGURATION=release") }
|
46
|
+
(dir / ".build" / "release" / "xccache-proxy").copy(to: default_bin_path)
|
47
|
+
end
|
25
48
|
end
|
26
49
|
|
27
50
|
def download
|
28
51
|
UI.section("Downloading xccache-proxy binary from remote...".magenta) do
|
29
52
|
Dir.create_tmpdir do |dir|
|
30
|
-
url = "
|
53
|
+
url = "#{REPO_URL}/releases/download/#{VERSION_OR_SHA}/xccache-proxy.zip"
|
31
54
|
default_bin_path.parent.mkpath
|
32
55
|
tmp_path = dir / File.basename(url)
|
33
56
|
Sh.run("curl -fSL -o #{tmp_path} #{url} && unzip -d #{default_bin_path.parent} #{tmp_path}")
|
@@ -38,7 +61,10 @@ module XCCache
|
|
38
61
|
end
|
39
62
|
|
40
63
|
def default_bin_path
|
41
|
-
@default_bin_path ||=
|
64
|
+
@default_bin_path ||= begin
|
65
|
+
dir = LIBEXEC / (default_use_downloaded? ? ".download" : ".build")
|
66
|
+
dir / "xccache-proxy-#{VERSION_OR_SHA}" / "xccache-proxy"
|
67
|
+
end
|
42
68
|
end
|
43
69
|
|
44
70
|
def local_bin_path
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xccache
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thuyen Trinh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-05-
|
11
|
+
date: 2025-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|
@@ -161,9 +161,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: '0'
|
162
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - "
|
164
|
+
- - ">="
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: '0'
|
167
167
|
requirements: []
|
168
168
|
rubygems_version: 3.2.33
|
169
169
|
signing_key:
|