Skip to content

Commit

Permalink
ci: fixed ci script which sets minor and major version. Needed in ord…
Browse files Browse the repository at this point in the history
…er to get working the firmware version checker
  • Loading branch information
Antonio Aloisio committed May 22, 2019
1 parent 3419921 commit 5634a86
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ jobs:
if [ -z "${CIRCLE_TAG}" ]; then
echo "Nothing to do. Not a release."
else
MAJOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([^-]*)-.*/\1/')
MINOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/[^-]*-(.*)/\1/')
MAJOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([0-9.]*)[_-]?(.*)/\1/')
MINOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([0-9.]*)[_-]?(.*)/\2/')
sed -i "s/SERIALNO=.*/SERIALNO=${MAJOR_VER}/g" release/src-rt/version.conf
sed -i "s/EXTENDNO=.*/EXTENDNO=${MINOR_VER}/g" release/src-rt/version.conf
fi
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
name: Remove image without firmware
command: |
cd ${PROJECT_DIR}/release/${RELEASE_DIR}/image/
rm $(ls DSL-* | grep -v ".*DSL.*DSL.*")
rm $(ls DSL-* | grep -v ".*DSL.*DSL.*") -f
ls
- run:
name: Prepare workspace
Expand Down Expand Up @@ -117,16 +117,16 @@ jobs:
git config --global push.default simple
git clone -b master --single-branch [email protected]:gnuton/asuswrt-merlin.ng.git
cd asuswrt-merlin.ng
echo "Creating manifest file..."
UPDATE_DIR=updates
MAJOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([^-]*)-.*/\1/')
MINOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/[^-]*-(.*)/\1/')
MAJOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([0-9.]*)[_-]?(.*)/\1/')
MINOR_VER=$(echo "${CIRCLE_TAG}" | sed -E 's/([0-9.]*)[_-]?(.*)/\2/')
RELEASE_NOTE_FILE=$(echo "${MAJOR_VER}_${MINOR_VER}_note.txt" | sed "s/\./_/")
echo "Generating manifest file..."
echo "DSL-AC68U#FW${MAJOR_VER}#EXT${MINOR_VER}#BETAFW0#BETAEXT0#" > ${UPDATE_DIR}/manifest.txt
cp $HOME/project/workspace/release/CHANGELOG ${UPDATE_DIR}/"${RELEASE_NOTE_FILE}"
echo "Uploading to github manifest and ${RELEASE_NOTE_FILE}"
git add ${UPDATE_DIR}
git commit -m "Updating Notes and manifest to ${MAJOR_VER} ${MINOR_VER} [ci skip]" -a
git commit -m "Updating Notes and manifest to version:${MAJOR_VER} ${MINOR_VER} [ci skip]" -a
git push origin
publish-github-release:
docker:
Expand Down

0 comments on commit 5634a86

Please sign in to comment.