Skip to content

Commit a441e55

Browse files
authored
fpm CI: add timestamp (#46)
2 parents 826c017 + 09dd828 commit a441e55

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/fpm-version-update.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,23 @@ jobs:
6262
- name: Update formula
6363
if: env.UPDATE_NEEDED == 'true'
6464
run: |
65-
sed -i "1i # Formula last updated on $(date)" Formula/fpm.rb
6665
sed -i "s|url \".*\"|url \"https://github.com/fortran-lang/fpm/releases/download/${LATEST_VERSION_V}/fpm-${LATEST_VERSION}.zip\"|" Formula/fpm.rb
6766
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
6868
6969
- name: Commit changes
7070
if: env.UPDATE_NEEDED == 'true'
7171
run: |
7272
git config --global user.name "GitHub Actions"
7373
git config --global user.email "[email protected]"
7474
git add Formula/fpm.rb
75+
git status # Check if any files are staged for commit
7576
git commit -m "Update fpm to ${LATEST_VERSION}"
7677
7778
- name: Push changes to branch
7879
if: env.UPDATE_NEEDED == 'true'
7980
run: |
80-
git push origin "${BRANCH_NAME}"
81+
git push origin ${{ env.BRANCH_NAME }}
8182
8283
- name: Create Pull Request
8384
if: env.UPDATE_NEEDED == 'true'

Formula/fpm.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Formula last updated on 2025-03-10
2+
13
class Fpm < Formula
24
desc "Fortran Package Manager (fpm)"
35
homepage "https://fpm.fortran-lang.org"

0 commit comments

Comments
 (0)