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

how to implement this ? #41

Open
feydreva opened this issue Mar 7, 2024 · 11 comments
Open

how to implement this ? #41

feydreva opened this issue Mar 7, 2024 · 11 comments

Comments

@feydreva
Copy link

feydreva commented Mar 7, 2024

Hello,
I am really interested in this.
I maintain an AUR package.
I got nvcheker working, so I get a notification when a new version is there.
But I need to manually update the PKGBUILD and manually git push to aur.

I would love to have a bot doing version update automatically, but reading this, I don't understand how to implement it.
Could you guide me with more instruction ?

Thank you

@carlosal1015
Copy link
Member

carlosal1015 commented Mar 7, 2024

Nice @feydreva , first step is add as comaintaner the user AutoUpdateBot like this
image

Then, submit a pull request and create a file over config/feydreva/<package-name>.yaml for example, here you can share your nvchecker entry to help to modify. For example

nvchecker:
  gitlab: libxc/libxc
  source: gitlab
  use_max_tag: true
test: true

@feydreva
Copy link
Author

feydreva commented Mar 7, 2024

Hello,
So after some effort, lots of reading about git and how it works, I made a pull request.
please be kind :)
if there is any mistake or other things I need to do, let me know !
Thank you for your help and patience

@carlosal1015
Copy link
Member

Thanks, let's run the pipeline for the PR #42

@feydreva
Copy link
Author

Hello,
Autobot doesn't seem to update the package with new version.
Is there anything I have to do ? how can I verify this ?
Thank you

@carlosal1015
Copy link
Member

True, winamax-bin.yaml needs python-lxml in order to support for htmlparser.
Many nvchecker configs here using regex like this

nvchecker:
  regex: pkgname-([\d.]+).tar.gz
  source: regex
  url: https://www.example.com
pkgver: get-pkgver
test:
  enable: true

We can switch to regex instead of xml parser.

@petronny
Copy link
Member

Autobot doesn't seem to update the package with new version.

https://github.com/arch4edu/aur-auto-update/actions/runs/8306337444/job/22734274209

 ModuleNotFoundError: No module named 'typing_extensions'
Error: Process completed with exit code 1.

This workflow is failing. Fixing now.

@petronny
Copy link
Member

petronny commented Mar 16, 2024

In https://github.com/arch4edu/aur-auto-update/actions/runs/8308392492/job/22738576498

 [I 03-16 14:21:15.467 core:374] winamax-bin: updated to 0;url=https://dl.winamax.fr/client/electron/linux/all/winamax-1.53.0.deb
No action is configured for winamax-bin.

Please check the parsed version. When the version is correct, please set test: true to enable the build test.

@feydreva
Copy link
Author

hmm trying to make a new config file, but do not succeed to make it work :/
This only place I see the name of the file is in the source code of the page :

regex doesn't seem to work here

@carlosal1015
Copy link
Member

No worries, if you have some progress, we could take a look.

@petronny
Copy link
Member

There is another problem. The page is hosted on cloudfront and could not be accessed from some country/region.
So it may return 403 sometime in GitHub Actions.

This only place I see the name of the file is in the source code of the page :
regex doesn't seem to work here

regex will work here.

nvchecker:
  source: "regex"
  url: "https://www.winamax.fr/jouer-au-poker?dl=1&platform=linux"
  regex: 'winamax-([\d.]+).deb'

@petronny
Copy link
Member

There is another problem. The page is hosted on cloudfront and could not be accessed from some country/region.
So it may return 403 sometime in GitHub Actions.

A workaround could be creating a proxy to access the content. The following is an example to do it with Cloudflare Worker (generated by GPT). You can also try other cloud function services.

export default {
  async fetch(request, env, ctx) {
    const url = "https://www.winamax.fr/jouer-au-poker?dl=1&platform=linux";
    const regex = /winamax-([\d.]+).deb/;

    try {
      const response = await fetch(url);
      const text = await response.text();
      const match = text.match(regex);

      if (match && match[1]) {
        return new Response(match[1]);
      } else {
        return new Response("No match found");
      }
    } catch (error) {
      return new Response("Error: " + error);
    }
  },
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants