File prepare-release.rb of Package element (Revision d9e8c65e50308b254b1af15bfb66abb8)
Currently displaying revision d9e8c65e50308b254b1af15bfb66abb8 , Show latest
23
1
#!/usr/bin/env ruby
2
3
lines = File.readlines("index.html")
4
5
modified = false
6
lines.map! do |line|
7
if line.include?('<meta property="og:image"')
8
puts "Modifying line #{line}"
9
line = '<meta property="og:image" content="https://element.smar.fi/opengraph.png" />'
10
modified = true
11
end
12
line
13
end
14
15
if modified == false
16
echo "WARNING: did not find correct og:image tag..."
17
exit 1
18
end
19
20
File.open "index.html", "w" do |file|
21
file.puts lines
22
end
23