Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Only regenerate Linux analytics data every hour #568

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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