Skip to content

Commit 02d40db

Browse files
committed
Fix meta.yaml patch: use OWNER and REPO from GITHUB_REPOSITORY
1 parent 04c2888 commit 02d40db

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/conda_release.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,25 @@ jobs:
4141
run: |
4242
cd conda-recipe
4343
44-
# Get OWNER (the part before the slash in GITHUB_REPOSITORY)
44+
# Extract OWNER and REPO from GITHUB_REPOSITORY (format: owner/repo)
4545
OWNER=${GITHUB_REPOSITORY%%/*}
46+
REPO=${GITHUB_REPOSITORY##*/}
4647
4748
# Replace the Jinja “{% set version = "..." %}” line:
4849
sed -i "s|^{% set version = \".*\" %}|{% set version = \"${{ steps.vars.outputs.VERSION }}\" %}|" meta.yaml
4950
5051
# Replace the “ sha256: ...” line (two‐space indentation under source:)
5152
sed -i "s|^ sha256: .*| sha256: ${{ steps.vars.outputs.SHA256 }}|" meta.yaml
5253
53-
# Update the source URL to use the real owner and version
54+
# Update the source URL to use the real owner, repo, and version
5455
# Original line looks like:
55-
# url: https://github.com/your-username/aligncount-demo/archive/v{{ version }}.tar.gz
56-
sed -i "s|^ url: .*| url: https://github.com/${OWNER}/aligncount-demo/archive/v${{ steps.vars.outputs.VERSION }}.tar.gz|" meta.yaml
56+
# url: <PLACEHOLDER>
57+
sed -i "s|^ url: .*| url: https://github.com/${OWNER}/${REPO}/archive/v${{ steps.vars.outputs.VERSION }}.tar.gz|" meta.yaml
5758
58-
# Update the homepage URL to use the real owner
59-
# (line indented two spaces under about:)
60-
sed -i "s|^ home: .*| home: https://github.com/${OWNER}/aligncount-demo|" meta.yaml
59+
# Update the homepage URL to use the real owner and repo
60+
# Original line looks like:
61+
# home: <PLACEHOLDER>
62+
sed -i "s|^ home: .*| home: https://github.com/${OWNER}/${REPO}|" meta.yaml
6163
6264
# 5) Build the conda package
6365
- name: Build conda package

conda-recipe/meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package:
66
version: {{ version }}
77

88
source:
9-
url: https://github.com/your-username/aligncount-demo/archive/v{{ version }}.tar.gz
9+
url: <PLACEHOLDER>
1010
sha256: <PLACEHOLDER>
1111

1212
build:
@@ -35,6 +35,6 @@ build:
3535
python -m pip install . --no-deps --ignore-installed -vv
3636
3737
about:
38-
home: https://github.com/your-username/aligncount-demo
38+
home: <PLACEHOLDER>
3939
license: MIT
4040
summary: "C++ linecount + Python wrapper"

0 commit comments

Comments
 (0)