Skip to content

Commit

Permalink
random
Browse files Browse the repository at this point in the history
  • Loading branch information
aman-1004 committed Jul 10, 2023
1 parent 3bda9fb commit 739fabe
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/packaging-action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Download version artifact
uses: actions/download-artifact@v3
with:
name: version
path: packaging

- name: Checkout Repository
uses: actions/checkout@v3

Expand All @@ -32,3 +38,10 @@ jobs:
with:
name: rpm-package
path: packaging/*.rpm

- name: Update Future Version
uses: actions/upload-artifact@v3
with:
name: version
path: packaging/VERSION.txt

9 changes: 7 additions & 2 deletions packaging/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export PKG_NAME=azure-files-diag
export RELEASE=1
export VERSION=1
VERSION := $(shell cat ./VERSION.txt)
export SYS_DIR=/opt/xstore
export SRC_DIR=..
# export PKG_BUILD=$(PKG_NAME)$(sles)-$(RELEASE)-1.x86_64
Expand All @@ -9,10 +9,12 @@ export PKG_DIR=$(PKG_NAME)
export DEB_PKG_DIR=$(PKG_DIR)/DEBIAN
export OPT_DIR=$(PKG_DIR)$(SYS_DIR)

build: init debian rpm clean
build: init debian rpm post clean
echo "Building deb and rpm packages"

init:
# if [ -f VERSION.txt ]; then echo "file present";VERSION=$(shell cat ./VERSION.txt); fi
echo "Building Version: ${VERSION}"
mkdir -p $(OPT_DIR)/bin
mkdir -p $(OPT_DIR)/lib
cp -r ../NfsDiagnostics $(OPT_DIR)/lib
Expand Down Expand Up @@ -40,5 +42,8 @@ rpm: init
mv ~/rpmbuild/RPMS/x86_64/*.rpm .
rm -r ~/rpmbuild

post:
expr ${VERSION} + 1 > VERSION.txt

clean:
rm -rf ./$(PKG_DIR) spec.spec
1 change: 1 addition & 0 deletions packaging/VERSION.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1

0 comments on commit 739fabe

Please sign in to comment.