Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
aruss committed Jun 15, 2018
1 parent 81445aa commit bd90830
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 23 deletions.
18 changes: 5 additions & 13 deletions appveyor-build.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
#!/bin/bash

DIR="$( cd "$( dirname "$0" )" && pwd )"

echo "install required tools"
sudo apt-get update
sudo apt-get --assume-yes install zip

echo "build windows version"
sh build.sh win7-x64 $APPVEYOR_BUILD_VERSION

echo "pack windows release files: $DIR/build/win7-x64/identitybase-$APPVEYOR_BUILD_VERSION -> $DIR/build/identitybase-$APPVEYOR_BUILD_VERSION.zip"
echo "pack windows release files: $APPVEYOR_BUILD_FOLDER/build/win7-x64/identitybase-$APPVEYOR_BUILD_VERSION -> $APPVEYOR_BUILD_FOLDER/build/identitybase-$APPVEYOR_BUILD_VERSION.zip"
cd ./build/win7-x64/ && zip -rq ../identitybase-$APPVEYOR_BUILD_VERSION.zip ./identitybase-$APPVEYOR_BUILD_VERSION && cd -
#appveyor PushArtifact $DIR/build/identitybase-$APPVEYOR_BUILD_VERSION.zip

echo "build linux version"
sh build.sh linux-x64 $APPVEYOR_BUILD_VERSION

echo "pack linux release files: $DIR/build/linux-x64/identitybase-$APPVEYOR_BUILD_VERSION -> $DIR/build/identitybase-$APPVEYOR_BUILD_VERSION.tgz"
tar -czf $DIR/build/identitybase-$APPVEYOR_BUILD_VERSION.tgz $DIR/build/linux-x64/identitybase-$APPVEYOR_BUILD_VERSION
#appveyor PushArtifact $DIR/build/identitybase-$APPVEYOR_BUILD_VERSION.tgz
echo "pack linux release files: $APPVEYOR_BUILD_FOLDER/build/linux-x64/identitybase-$APPVEYOR_BUILD_VERSION -> $APPVEYOR_BUILD_FOLDER/build/identitybase-$APPVEYOR_BUILD_VERSION.tgz"
tar -czf $APPVEYOR_BUILD_FOLDER/build/identitybase-$APPVEYOR_BUILD_VERSION.tgz $APPVEYOR_BUILD_FOLDER/build/linux-x64/identitybase-$APPVEYOR_BUILD_VERSION

echo "build docker image"
cp $DIR/distribution/Dockerfile $DIR/build/linux-x64
docker build $DIR/build/linux-x64 --build-arg VERSION=$APPVEYOR_BUILD_VERSION -t identitybasenet/identitybase:$APPVEYOR_BUILD_VERSION
cp $APPVEYOR_BUILD_FOLDER/distribution/Dockerfile $APPVEYOR_BUILD_FOLDER/build/linux-x64
docker build $APPVEYOR_BUILD_FOLDER/build/linux-x64 --build-arg VERSION=$APPVEYOR_BUILD_VERSION -t identitybasenet/identitybase:$APPVEYOR_BUILD_VERSION
11 changes: 1 addition & 10 deletions appveyor-deploy.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
#!/bin/bash

DIR="$( cd "$( dirname "$0" )" && pwd )"

echo "publish docker image"
docker login --username=$DOCKER_USER --password=$DOCKER_PASS
docker push identitybasenet/identitybase:$APPVEYOR_BUILD_VERSION

echo "create GitHub release"

echo "debug -------------------------------------------"
echo "DIR = $DIR"
ls $DIR/tools -l
ls $DIR/build -l
echo "debug -------------------------------------------"

sudo $DIR/tools/ghr -t "$GITHUB_TOKEN" -u "IdentityBaseNet" -r "IdentityBase" -c "$APPVEYOR_REPO_COMMIT" -delete -draft v$APPVEYOR_BUILD_VERSION $DIR/build
cd $APPVEYOR_BUILD_FOLDER/tools && ./ghr -t "$GITHUB_TOKEN" -u "IdentityBaseNet" -r "IdentityBase" -c "$APPVEYOR_REPO_COMMIT" -delete -draft v$APPVEYOR_BUILD_VERSION $APPVEYOR_BUILD_FOLDER/build && cd -

0 comments on commit bd90830

Please sign in to comment.