chapel-lang / mason-registry

Package registry for mason, Chapel's package manager
17 stars 25 forks source link

test #43

Closed ankushbhardwxj closed 4 years ago

ankushbhardwxj commented 4 years ago

@ben-albrecht The script still failed. Correct me if I am wrong.

Step - 1 git clone <chapel-repo> Directory structure :

Bricks/
utils/
README.rst
checkTomls.bash
chapel/

Step 2 : cd chapel && buildChapel && make check && make mason

Step 3: cd .. && git log -m -1 --name-only --pretty="format:" which should give Bricks/tests/0.0.1.toml, but in failed build gives ./util/travisScript.bash Otherwise, cd Bricks/tests and parse source. Clone the repo as newPackage, cd newPackage && mason publish --ci-check

ankushbhardwxj commented 4 years ago

Also tagging @ronawho here, for more inputs.

ben-albrecht commented 4 years ago

@ankingcodes So it seems there is an issue with the return of git log -m -1 --name-only --pretty="format:". Have you been able to test this locally?

Unrelated to the current error: it might be nice to remove the "state" of PWD by never changing directories:

git clone <chapel>
(cd chapel && buildChapel && make check && make mason)
(cd newPackage && mason publish --ci-check)
ankushbhardwxj commented 4 years ago

git log -m -1 --name-only --pretty="format:"

This worked fine for me locally

ben-albrecht commented 4 years ago

The issue isn't immediately obvious to me. I would suggest adding some debug prints (that would be useful to leave in long-term anyways), such as:

Also, I think we should expect multiple files in package string and parse the .toml files out of that, then loop over those TOML files and apply mason publish --ci-check. I think this will require some bigger changes... That said, let's continue trying to get the minimal example working before expanding to this.

ben-albrecht commented 4 years ago

I also wonder if there is any advantage to using $TRAVIS_BRANCH (source: https://stackoverflow.com/questions/41145041/list-files-modified-in-a-pull-request-within-travis) -- though that makes local testing more difficult to set up.