Skip to content

Commit

Permalink
Merge pull request #568 from Homebrew/stop-running-the-linux-update-a…
Browse files Browse the repository at this point in the history
…ction

ci: Only regenerate Linux analytics data every hour
  • Loading branch information
SMillerDev authored Oct 22, 2021
2 parents a9c9dc6 + 37ab66c commit 4af0e2f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ jobs:
git commit -m "docs: update API samples" _includes/api-samples
fi
- name: Update data for Homebrew/linuxbrew-core
- name: Update analytics data for Homebrew/linuxbrew-core
if: matrix.os == 'ubuntu-latest'
run: |
rake linux_formula_and_analytics
rake linux_analytics
git reset origin/master
git add _data/analytics-linux _data/formula-linux{,_canonical.json} _data/bottle-linux api/formula-linux api/bottle-linux formula-linux
if ! git diff --no-patch --exit-code HEAD -- _data/analytics-linux _data/formula-linux{,_canonical.json} _data/bottle-linux api/formula-linux api/bottle-linux formula-linux; then
git commit -m "formula-linux: updates from Homebrew/linuxbrew-core" _data/analytics-linux _data/formula-linux{,_canonical.json} _data/bottle-linux api/formula-linux api/bottle-linux formula-linux
git add _data/analytics-linux
if ! git diff --no-patch --exit-code HEAD -- _data/analytics-linux; then
git commit -m "analytics-linux: Updates from Linuxbrew's GA" _data/analytics-linux
fi
- name: Push commits
Expand Down
5 changes: 2 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,8 @@ task formula_and_analytics: %i[formulae analytics]
desc "Dump macOS casks and analytics data"
task cask_and_analytics: %i[cask analytics]

desc "Dump Linux formulae and analytics data"
task :linux_formula_and_analytics do
Rake::Task["formulae"].tap(&:reenable).invoke("linux")
desc "Dump Linux analytics data"
task :linux_analytics do
Rake::Task["analytics"].tap(&:reenable).invoke("linux")
end

Expand Down

0 comments on commit 4af0e2f

Please sign in to comment.