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: change how upstream project is tracked #295

Merged
merged 1 commit into from
Dec 15, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/check-upstream.main.kts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ workflow(
name = "Clone snakeyaml-engine and check for changes",
command = """
git clone --branch master --single-branch https://bitbucket.org/snakeyaml/snakeyaml-engine.git
wget https://raw.githubusercontent.com/krzema12/snakeyaml-engine-kmp/${'$'}{{ github.ref }}/upstream-commit.txt
wget https://raw.githubusercontent.com/krzema12/snakeyaml-engine-kmp/${'$'}{{ github.ref }}/latest-analyzed-upstream-commit.txt
cd snakeyaml-engine
UPSTREAM_COMMIT=$(cat ../upstream-commit.txt)
UPSTREAM_COMMIT=$(cat ../latest-analyzed-upstream-commit.txt)
echo "See in BitBucket: https://bitbucket.org/snakeyaml/snakeyaml-engine/branches/compare/master..${'$'}UPSTREAM_COMMIT" > ../$logDiffBetweenRepos
echo "" >> ../$logDiffBetweenRepos
git log --oneline ${'$'}UPSTREAM_COMMIT..master >> ../$logDiffBetweenRepos
Expand All @@ -46,7 +46,7 @@ workflow(
)
run(
name = "Create an SVG with the number of commits",
command = "wget -O $badgeFileName https://img.shields.io/badge/To%20upstream-$(cat $numberOfCommitsFileName)-blue",
command = "wget -O $badgeFileName https://img.shields.io/badge/Not%20analyzed%20from%20upstream-$(cat $numberOfCommitsFileName)-blue",
)
run(
name = "Preview badge",
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/check-upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ jobs:
name: 'Clone snakeyaml-engine and check for changes'
run: |-
git clone --branch master --single-branch https://bitbucket.org/snakeyaml/snakeyaml-engine.git
wget https://raw.githubusercontent.com/krzema12/snakeyaml-engine-kmp/${{ github.ref }}/upstream-commit.txt
wget https://raw.githubusercontent.com/krzema12/snakeyaml-engine-kmp/${{ github.ref }}/latest-analyzed-upstream-commit.txt
cd snakeyaml-engine
UPSTREAM_COMMIT=$(cat ../upstream-commit.txt)
UPSTREAM_COMMIT=$(cat ../latest-analyzed-upstream-commit.txt)
echo "See in BitBucket: https://bitbucket.org/snakeyaml/snakeyaml-engine/branches/compare/master..$UPSTREAM_COMMIT" > ../log-diff-between-repos.txt
echo "" >> ../log-diff-between-repos.txt
git log --oneline $UPSTREAM_COMMIT..master >> ../log-diff-between-repos.txt
git log --oneline $UPSTREAM_COMMIT..master | wc -l > ../number-of-commits.txt
- id: 'step-2'
name: 'Create an SVG with the number of commits'
run: 'wget -O commits-to-upstream-badge.svg https://img.shields.io/badge/To%20upstream-$(cat number-of-commits.txt)-blue'
run: 'wget -O commits-to-upstream-badge.svg https://img.shields.io/badge/Not%20analyzed%20from%20upstream-$(cat number-of-commits.txt)-blue'
- id: 'step-3'
name: 'Preview badge'
run: 'cat commits-to-upstream-badge.svg'
Expand Down
1 change: 1 addition & 0 deletions latest-analyzed-upstream-commit.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bf51157792e25bdf9c3bb095e28abed0f16ec079
1 change: 0 additions & 1 deletion upstream-commit.txt

This file was deleted.

Loading