GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Ajsalemo/script_utils: Bash scripts to speed up repetitive tasks.

BranchesTags
Open more actions menu

Latest commit

 

History

19 Commits
19 Commits

Folders and files

NameName
Last commit message
Last commit date
ScriptUtils
ScriptUtils
 
 
README.md
README.md
 
 

Repository files navigation

script_utils

Bash scripts to condense and/or automate repititive local tasks.


docker_make_utils.sh

A script made to automate the task of building, tagging and pushing local Docker images to Azure Container Registry(ACR).

Usage

<command> options [parameters]
-h | --help - show help

Example. bash docker_make_utils.sh mycontainerregistry helloworld This is the equivalent to:
docker build -t helloworld .
docker tag helloworld mycontainerregistry.azurecr.io/helloworld:latest
docker push mycontainerregistry.azurecr.io/helloworld:latest

Note: If omitting the tag for the image, this will default to latest. A tag can be supplied as the 3rd argument, as seen in an example below:
bash docker_make_utils.sh mycontainerregistry helloworld v1
This is the equivalent to:
docker build -t helloworld .
docker tag helloworld mycontainerregistry.azurecr.io/helloworld:v1
docker push mycontainerregistry.azurecr.io/helloworld:v1

Note: You must still log in with either AZ CLI and run docker login before pushing to the container registry for the first time, if not authenticated already.
Tip: Bash scripts can be aliased locally - by editing the .bashrc file and adding the script location to your PATH to run this globally. Doing so then can have the script be run in the following manner(where dutils is the alias name): dutils mycontainerregistry helloworld v1



git_push_utils.sh

A script made to automate pushing git commits.

Usage

<command> options [parameters]
-h | --help - show help
The command requires a minimum of two arguments, which is the commit message(arg: 1) and upstream repo(arg: 2). Omitting the third argument which is the branch(arg: 3) will default to 'main'.

Example: bash git_push_utils.sh 'my first commit' origin This is the equivalent to:
git add .
git commit -m 'my first commit'
git push origin main

Note: The commit message must be in a string unless using only a single word for the commit message.

How it looks when specifying a branch. Example: bash git_push_utils.sh 'my first commit' origin dev This is the equivalent to:
git add .
git commit -m 'my first commit'
git push origin dev

As mentioned above, this script can be aliased within your .bashrc and script location added to your PATH so it can be executed globally.
Aliased example, where gutils is the script alias name: gutils 'initial commit' origin testing

About

Bash scripts to speed up repetitive tasks.

Topics

automationazureazure-container-registrybashdeploydeploymentdockergitlinuxlinux-shelllinux-shellcodescriptshellshell-scriptterminal

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.