File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change 62
62
- name : Update formula
63
63
if : env.UPDATE_NEEDED == 'true'
64
64
run : |
65
- # Replace the existing timestamp or add a new one at the top if it doesn't exist
66
- if grep -q "# Formula last updated on" Formula/fpm.rb; then
67
- # Replace the existing timestamp line
68
- sed -i "0,/# Formula last updated on/ c\# Formula last updated on $(date +'%Y-%m-%d %H:%M:%S')" Formula/fpm.rb
69
- else
70
- # If no timestamp line exists, add it at the top
71
- sed -i "1i\# Formula last updated on $(date +'%Y-%m-%d %H:%M:%S')" Formula/fpm.rb
72
- fi
73
65
sed -i "s|url \".*\"|url \"https://github.com/fortran-lang/fpm/releases/download/${LATEST_VERSION_V}/fpm-${LATEST_VERSION}.zip\"|" Formula/fpm.rb
74
66
sed -i "s|sha256 \".*\"|sha256 \"${SHA256}\"|" Formula/fpm.rb
67
+ echo "# Formula last updated on $(date +'%Y-%m-%d %H:%M:%S')" >> Formula/fpm.rb
75
68
76
69
- name : Commit changes
77
70
if : env.UPDATE_NEEDED == 'true'
You can’t perform that action at this time.
0 commit comments