bard 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bard/github_pages.rb +9 -8
- data/lib/bard/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 174131e5900ea17bf66a3f3601402312e5fc32f55ad85f567fd098962f371e5a
|
4
|
+
data.tar.gz: '09ab3768eaf3350ee4cd3e44219ad9ad20f97f86567fa817cf7474c7601f5152'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b7e3514a18e5a4371f0007f4b2a3edd5ccaf089fc805e3c9eae3fecf7ea028a74c20b36d72ef4286eed0cb9174a0f5c7089fea0bb99be702dfab075d5945352
|
7
|
+
data.tar.gz: 93ef285587ae96cbda6aec6711c694bcd5157c8522ad8791d68b05a4f22dea4354a6125cc3831924f8650ecf3a0e21d608aa72ffe098e352e0d096e1b840e311
|
data/lib/bard/github_pages.rb
CHANGED
@@ -23,8 +23,9 @@ module Bard
|
|
23
23
|
def build_site
|
24
24
|
FileUtils.rm_rf "tmp/github-build-".sub(@sha, "*")
|
25
25
|
run! <<~BASH
|
26
|
-
|
26
|
+
set -e
|
27
27
|
RAILS_ENV=production bundle exec rails s -p 3000 -d --pid tmp/pids/server.pid
|
28
|
+
bundle exec rake assets:clean assets:precompile
|
28
29
|
|
29
30
|
# Create the output directory and enter it
|
30
31
|
BUILD=#{@build_dir}
|
@@ -34,17 +35,17 @@ module Bard
|
|
34
35
|
cd $BUILD
|
35
36
|
|
36
37
|
# wait until server responds
|
37
|
-
|
38
|
+
echo waiting...
|
39
|
+
curl --retry 5 --retry-delay 2 http://localhost:3000
|
38
40
|
|
41
|
+
echo copying...
|
39
42
|
# Mirror the site to the build folder, ignoring links with query params
|
40
|
-
wget --reject-regex "(.*)\\?(.*)" -FEmnH http://
|
43
|
+
wget --reject-regex "(.*)\\?(.*)" -FEmnH http://localhost:3000/
|
41
44
|
echo #{@domain} > CNAME
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
+
BASH
|
46
|
+
ensure # cleanup
|
47
|
+
run! <<~BASH
|
45
48
|
cat tmp/pids/server.pid | xargs -I {} kill {}
|
46
|
-
|
47
|
-
# Clean up the assets
|
48
49
|
rm -rf public/assets
|
49
50
|
BASH
|
50
51
|
end
|
data/lib/bard/version.rb
CHANGED