Add branch_name.sh to print out only the branch name

This commit is contained in:
Matt McWilliams 2023-02-25 22:22:42 -05:00
parent 81b6846261
commit d9290f7262
8 changed files with 15 additions and 8 deletions

View File

@ -1,5 +1,5 @@
{
"version": "1.7.19",
"version": "1.7.20",
"ext_port": 1111,
"profiles": {
"mcopy": {

2
app/package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "mcopy-app",
"version": "1.7.19",
"version": "1.7.20",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@ -1,6 +1,6 @@
{
"name": "mcopy-app",
"version": "1.7.19",
"version": "1.7.20",
"description": "GUI for the mcopy small gauge film optical printer platform",
"main": "main.js",
"scripts": {

View File

@ -1,5 +1,5 @@
{
"version": "1.7.19",
"version": "1.7.20",
"ext_port": 1111,
"profiles": {
"mcopy": {

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "mcopy",
"version": "1.7.19",
"version": "1.7.20",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "mcopy",
"version": "1.7.19",
"version": "1.7.20",
"license": "MIT",
"dependencies": {
"arduino": "file:app/lib/arduino",

View File

@ -1,6 +1,6 @@
{
"name": "mcopy",
"version": "1.7.19",
"version": "1.7.20",
"description": "Small gauge film optical printer platform",
"main": "build.js",
"directories": {

View File

@ -1,5 +1,5 @@
{
"version": "1.7.19",
"version": "1.7.20",
"ext_port": 1111,
"profiles": {
"mcopy": {

7
scripts/branch_name.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
branch_name=$(git symbolic-ref -q HEAD)
branch_name=${branch_name##refs/heads/}
branch_name=${branch_name:-HEAD}
echo $branch_name