Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine-api
Commits
968d58d8
Commit
968d58d8
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Remove unused file.
parent
f0edb075
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
git_push.sh
+0
-52
0 additions, 52 deletions
git_push.sh
with
0 additions
and
52 deletions
git_push.sh
deleted
100644 → 0
+
0
−
52
View file @
f0edb075
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
git_user_id
=
$1
git_repo_id
=
$2
release_note
=
$3
if
[
"
$git_user_id
"
=
""
]
;
then
git_user_id
=
"GIT_USER_ID"
echo
"[INFO] No command line input provided. Set
\$
git_user_id to
$git_user_id
"
fi
if
[
"
$git_repo_id
"
=
""
]
;
then
git_repo_id
=
"GIT_REPO_ID"
echo
"[INFO] No command line input provided. Set
\$
git_repo_id to
$git_repo_id
"
fi
if
[
"
$release_note
"
=
""
]
;
then
release_note
=
"Minor update"
echo
"[INFO] No command line input provided. Set
\$
release_note to
$release_note
"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add
.
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit
-m
"
$release_note
"
# Sets the new remote
git_remote
=
`
git remote
`
if
[
"
$git_remote
"
=
""
]
;
then
# git remote not defined
if
[
"
$GIT_TOKEN
"
=
""
]
;
then
echo
"[INFO]
\$
GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/
${
git_user_id
}
/
${
git_repo_id
}
.git
else
git remote add origin https://
${
git_user_id
}
:
${
GIT_TOKEN
}
@github.com/
${
git_user_id
}
/
${
git_repo_id
}
.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo
"Git pushing to https://github.com/
${
git_user_id
}
/
${
git_repo_id
}
.git"
git push origin master 2>&1 |
grep
-v
'To https'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment