pbmenv 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -1
- data/Gemfile.lock +1 -1
- data/lib/pbmenv/version.rb +1 -1
- data/lib/pbmenv.rb +11 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9a7bfc60b36d4c37090e73b0b8ce6e2c0bba454bc15d1eb868a7c79bdbe1bf4
|
4
|
+
data.tar.gz: 7ab067f69450da109588bb69f4fbb5ab4cb928f77335b312988db6bc261aac62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d8d3cccb07cbaca61a8e677ff49d03ec30025db9855bed03277e0ce7ddb18b15216978250fa6f15503bdff1cb08988eaec84ab15f9d1ad886e047e05f9da0ef
|
7
|
+
data.tar.gz: 4f3d85457dc011d46f05b820b2f145c34e02b5fbe75b9cf6fa91a4c11300e39179d343b5f3a0bb269bd9232713fa0ffaf39d8bbede5d68280799741aecc15fcc
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/pbmenv/version.rb
CHANGED
data/lib/pbmenv.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "securerandom"
|
4
|
+
|
3
5
|
require_relative "pbmenv/version"
|
4
6
|
require_relative "pbmenv/cli"
|
5
7
|
require_relative "pbmenv/pbm"
|
@@ -30,22 +32,28 @@ module Pbmenv
|
|
30
32
|
mkdir -p #{PBM_DIR}/v#{version} && cp -r procon_bypass_man-#{version}/project_template/* #{PBM_DIR}/v#{version}/
|
31
33
|
SHELL
|
32
34
|
|
33
|
-
# sharedディレクトリを作成して、device_idへのシムリンクを作成する. device_idの中身はpbmで行う
|
34
35
|
unless File.exists?("#{PBM_DIR}/shared")
|
35
36
|
system_and_puts <<~SHELL
|
36
37
|
mkdir -p #{PBM_DIR}/shared
|
37
38
|
SHELL
|
38
39
|
end
|
39
40
|
|
41
|
+
unless File.exists?("#{PBM_DIR}/shared/device_id")
|
42
|
+
File.write("#{PBM_DIR}/shared/device_id", "d_#{SecureRandom.uuid}")
|
43
|
+
end
|
44
|
+
|
40
45
|
system_and_puts <<~SHELL
|
41
46
|
ln -s #{PBM_DIR}/shared/device_id #{PBM_DIR}/v#{version}/device_id
|
42
47
|
SHELL
|
48
|
+
|
43
49
|
use version
|
44
50
|
rescue => e
|
45
51
|
system_and_puts "rm -rf #{PBM_DIR}/v#{version}"
|
46
52
|
raise
|
47
53
|
ensure
|
48
|
-
|
54
|
+
if Dir.exists?("./procon_bypass_man-#{version}")
|
55
|
+
system_and_puts "rm -rf ./procon_bypass_man-#{version}"
|
56
|
+
end
|
49
57
|
end
|
50
58
|
|
51
59
|
# TODO currentが挿しているバージョンはどうする?
|
@@ -77,6 +85,7 @@ module Pbmenv
|
|
77
85
|
git clone https://github.com/splaplapla/procon_bypass_man.git procon_bypass_man-#{version}
|
78
86
|
SHELL
|
79
87
|
else
|
88
|
+
# TODO cache for testing
|
80
89
|
shell = <<~SHELL
|
81
90
|
curl -L https://github.com/splaplapla/procon_bypass_man/archive/refs/tags/v#{version}.tar.gz | tar xvz
|
82
91
|
SHELL
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pbmenv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jiikko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A package manager of PBM
|
14
14
|
email:
|