Skip to content

simplify ci scripts #3364

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

Merged
merged 2 commits into from
Oct 28, 2018
Merged

simplify ci scripts #3364

merged 2 commits into from
Oct 28, 2018

Conversation

matthiaskrgr
Copy link
Member

@matthiaskrgr matthiaskrgr commented Oct 26, 2018

This makes it easier to flip the switch on pedantic lints on the clippy codebase.

ci/base-tests.sh Outdated
do
cd ${dir}
${CLIPPY} -- -D clippy::all
cd ${CWD_OLD}
Copy link

Choose a reason for hiding this comment

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

Maybe pushd and popd since Travis uses bash?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't understand.
The bash script and cd'ing inside it should work just fine on travis?

Copy link

Choose a reason for hiding this comment

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

Ah no, it will definitely work. pushd & popd was just a suggestion for readability and to me it looked like an easy "-1 LoC optimization" :D.

Copy link
Member Author

Choose a reason for hiding this comment

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

Mh, I am not familiar with pushd and popd and have never used them so I would rather keep it the current way, but thanks for the suggestion :)

Copy link

Choose a reason for hiding this comment

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

I am not familiar with pushd and popd and have never used them

They manage the directory stack in your shell:

[user@server /usr/ports] $ pushd /etc 
/etc /usr/ports
[user@server /etc] $ popd
/usr/ports
[user@server /usr/ports] $

This may come in handy when you need to quickly jump back and forth between directories without having to save all old locations in variables.

Copy link
Member

@phansch phansch Oct 27, 2018

Choose a reason for hiding this comment

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

Since this is just going back and forth between two directories, I think pushd and popd are not really needed here. But the cd ${CWD_OLD} can be replaced with cd -, so we don't need to store CWD_OLD.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 updated

@matthiaskrgr matthiaskrgr added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Oct 26, 2018
@phansch
Copy link
Member

phansch commented Oct 28, 2018

bors r+

bors bot added a commit that referenced this pull request Oct 28, 2018
3364: simplify ci scripts r=phansch a=matthiaskrgr

This makes it easier to flip the switch on pedantic lints on the clippy codebase.

Co-authored-by: Matthias Krüger <[email protected]>
@bors
Copy link
Contributor

bors bot commented Oct 28, 2018

@bors bors bot merged commit a90084d into rust-lang:master Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants