File tree Expand file tree Collapse file tree 3 files changed +70
-1
lines changed Expand file tree Collapse file tree 3 files changed +70
-1
lines changed Original file line number Diff line number Diff line change @@ -18,3 +18,6 @@ config.status
1818# Build outputs
1919include /libplatform.h
2020Makefile
21+
22+ # Dist directory
23+ libplatform- *
Original file line number Diff line number Diff line change 11# readfile.m4
2- dnl Copyright (C) 2023 ChenPi11 .
2+ dnl Copyright (C) 2023 The C++ Plus Project .
33dnl This file is free software; The C++ Plus Project
44dnl gives unlimited permission to copy and/or distribute it,
55dnl with or without modifications, as long as this notice is preserved.
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Prepare libplatform release.
4+ # You need call this script on libplatform root directory.
5+
6+ # The libplatform library is free software; you can redistribute it
7+ # and/or modify it under the terms of the The Unlicense
8+ # as published by the unlicense.org.
9+ #
10+ # The libplatform library is distributed in the hope that it will be
11+ # useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
12+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the The
13+ # Unlicense for more details.
14+ #
15+ # You should have received a copy of the The Unlicense
16+ # along with the libplatform library; see the file LICENSE.
17+ # If not, see <https://unlicense.org>.
18+
19+ # Usage: ./prepare-releace [VERSION]
20+ #
21+
22+ usage ()
23+ {
24+ echo " Usage: $0 : [VERSION]"
25+ exit 1
26+ }
27+
28+ if [ " $1 " == " " ]
29+ then
30+ usage
31+ else
32+ export VERSION=" $1 "
33+ fi
34+
35+ # Check git status
36+ if [[ $( git status --porcelain) ]]
37+ then
38+ # There are uncommitted changes
39+ git clean -fdxn
40+ echo " Warning: You need to store uncommitted changes or untracked files, or the release will be unsafe"
41+ echo " AND YOU UNTRACKED DATA WILL *LOST FOREVER*!!!!!!!!!!"
42+ exit 1
43+ fi
44+
45+ # Clean repo
46+ git clean -fdx
47+
48+ # Generate files
49+ make -f Makefile.devel
50+
51+ # Add project name to version
52+ export VERSION=" libplatform-$VERSION "
53+
54+ # Remove old dist
55+ rm -rf $VERSION
56+
57+ # Copy files
58+ mkdir -p $VERSION
59+
60+ for f in $( ls -d * --color=never) ; do
61+ if [ " $f " != " tools" ] && [ " $f " != " $VERSION " ]
62+ then
63+ echo " Add file or directory: $f "
64+ cp -r " $f " $VERSION
65+ fi
66+ done
You can’t perform that action at this time.
0 commit comments