-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,18 @@ | ||
# This script ensura that nit is a git repository with a fetched origin | ||
# It helps CI/CD environment that | ||
|
||
if ! test -f src/nitc.nit; then | ||
if [ ! -f src/nitc.nit ]; then | ||
echo "Error: run the script in the root directory of nit" | ||
exit 1 | ||
fi | ||
if [ ! -d .git ]; then | ||
echo "No git directory" | ||
exit 1 | ||
fi | ||
|
||
set -x | ||
git config --global --add safe.directory /__w/nit/nit | ||
git config --global --add safe.directory "$PWD" | ||
if [ -d .git ]; then | ||
git remote set-url origin https://github.com/nitlang/nit.git | ||
git fetch origin | ||
git branch -av | ||
else | ||
git init | ||
git remote add origin https://github.com/nitlang/nit.git | ||
git fetch origin | ||
git reset "$GITHUB_SHA" | ||
git branch -av | ||
fi | ||
git config --global --add safe.directory "$PWD" # because github action requires it | ||
git fetch origin | ||
git remote -v | ||
git branch -av | ||
git log --oneline --graph --decorate origin/master..HEAD |