Commit Graph

5 Commits

Author SHA1 Message Date
Kazuhiro MUSASHI 522b11ce16 Mac OS向けにオプションを変更:
```
--- a/tasks/build.rake
+++ b/tasks/build.rake
@@ -24,12 +24,14 @@ task :build do
     if os == :linux
       sh 'grep -l -r ecx.images-amazon.com | sort | uniq | xargs --no-run-if-empty sed -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g"'
       sh 'grep -l -r "http://www.amazon.co.jp/exec" | sort | uniq | xargs --no-run-if-empty sed -i -e "s/http:\/\/www.amazon.co.jp\/exec/https:\/\/www.amazon.co.jp\/exec/g"'
+      sh 'find . -type f -name "*.mde" | xargs --no-run-if-empty rm || true'
+      sh 'find . -type f -name "*.md-e" | xargs --no-run-if-empty rm || true'
     else
-      sh 'grep -l -r ecx.images-amazon.com | sort | uniq | xargs d -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g"'
-      sh 'grep -l -r "http://www.amazon.co.jp/exec" | sort | uniq | xargs sed -i -e "s/http:\/\/www.amazon.co.jp\/exec/https:\/\/www.amazon.co.jp\/exec/g"'
+      sh 'grep -l -r ecx.images-amazon.com . | sort | uniq | xargs d -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g"'
+      sh 'grep -l -r "http://www.amazon.co.jp/exec" . | sort | uniq | xargs sed -i -e "s/http:\/\/www.amazon.co.jp\/exec/https:\/\/www.amazon.co.jp\/exec/g"'
+      sh 'find . -type f -name "*.mde" | xargs rm || true'
+      sh 'find . -type f -name "*.md-e" | xargs rm || true'
     end
-    sh 'find . -type f -name "*.mde" | xargs --no-run-if-empty rm || true'
-    sh 'find . -type f -name "*.md-e" | xargs --no-run-if-empty rm || true'
   end

   cd 'public' do
```
2019-06-16 17:23:16 +07:00
Kazuhiro MUSASHI c06b55ae44 Build the blog site for the staging environment:
```
--- a/tasks/build.rake
+++ b/tasks/build.rake
@@ -36,5 +36,5 @@ task :build do
     sh 'rm -rf *'
   end

-  sh 'hugo'
+  sh 'hugo -e staging -v'
 end
```
2019-05-06 11:13:44 +08:00
Kazuhiro MUSASHI 4d0a0b1add Change the grep option/arguments to list up all the markdown files. 2019-04-20 14:36:03 +08:00
Kazuhiro MUSASHI 20da08ecbb Delete the `public` directory before generating the contents.
```
--- a/tasks/build.rake
+++ b/tasks/build.rake
@@ -20,8 +20,6 @@ end

 desc 'Generate the HTML pages'
 task :build do
-  sh 'hugo'
-
   cd 'content/post' do
     if os == :linux
       sh 'grep -l ecx.images-amazon.com *.md | sort | uniq | xargs --no-run-if-empty sed -ie "s/http:\/\/ecx.images-amazon.com/https:\/\/images-na.ssl-images-amazon.com/g"'
@@ -33,4 +31,10 @@ task :build do
     sh 'rm *.mde || true'
     sh 'rm *.md-e || true'
   end
+
+  cd 'public' do
+    sh 'rm -rf *'
+  end
+
+  sh 'hugo'
 end
```
2019-04-13 19:03:45 +08:00
Kazuhiro MUSASHI 3c8b202f54 initial commit 2019-03-31 19:00:21 +08:00